diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 00000000000..d9c5a4d579a --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,2 @@ +report_todo = "Unnumbered" +report_fixme = "Unnumbered" diff --git a/src/agent.rs b/src/agent.rs index f162c4ad9e6..550c0b1d4d2 100644 --- a/src/agent.rs +++ b/src/agent.rs @@ -272,7 +272,7 @@ impl Discoverer for Context { let bridge = LOCAL_AGENTS_POOL.with(|pool| { match pool.borrow_mut().entry::>() { anymap::Entry::Occupied(mut entry) => { - // TODO Insert callback! + // TODO(#940): Insert callback! entry.get_mut().create_bridge(callback) } anymap::Entry::Vacant(entry) => { @@ -423,7 +423,7 @@ impl Discoverer for Private { let msg = FromWorker::::unpack(&data); match msg { FromWorker::WorkerLoaded => { - // TODO Send `Connected` message + // TODO(#948): Send `Connected` message } FromWorker::ProcessOutput(id, output) => { assert_eq!(id.raw_id(), SINGLETON_ID.raw_id()); @@ -431,7 +431,7 @@ impl Discoverer for Private { } } }; - // TODO Need somethig better... + // TODO(#947): Need somethig better... let name_of_resource = AGN::name_of_resource(); let worker = js! { var worker = new Worker(@{name_of_resource}); @@ -463,7 +463,7 @@ impl fmt::Debug for PrivateBridge { impl Bridge for PrivateBridge { fn send(&mut self, msg: AGN::Input) { - // TODO Important! Implement. + // TODO(#937): Important! Implement. // Use a queue to collect a messages if an instance is not ready // and send them to an agent when it will reported readiness. let msg = ToWorker::ProcessInput(SINGLETON_ID, msg).pack(); @@ -478,7 +478,7 @@ impl Bridge for PrivateBridge { impl Drop for PrivateBridge { fn drop(&mut self) { - // TODO Send `Destroy` message. + // TODO(#946): Send `Destroy` message. } } @@ -525,7 +525,7 @@ impl Discoverer for Public { let bridge = REMOTE_AGENTS_POOL.with(|pool| { match pool.borrow_mut().entry::>() { anymap::Entry::Occupied(mut entry) => { - // TODO Insert callback! + // TODO(#945): Insert callback! entry.get_mut().create_bridge(callback) } anymap::Entry::Vacant(entry) => { @@ -537,7 +537,7 @@ impl Discoverer for Public { let msg = FromWorker::::unpack(&data); match msg { FromWorker::WorkerLoaded => { - // TODO Send `Connected` message + // TODO(#944): Send `Connected` message let _ = REMOTE_AGENTS_LOADED.with(|local| { local.borrow_mut().insert(TypeId::of::()) }); @@ -615,7 +615,7 @@ impl PublicBridge { } fn send_to_remote(worker: &Value, msg: ToWorker) { - // TODO Important! Implement. + // TODO(#937): Important! Implement. // Use a queue to collect a messages if an instance is not ready // and send them to an agent when it will reported readiness. let msg = msg.pack(); @@ -822,7 +822,7 @@ impl Clone for AgentLink { struct AgentRunnable { agent: Option, - // TODO Use agent field to control create message this flag + // TODO(#939): Use agent field to control create message this flag destroyed: bool, } diff --git a/src/html/mod.rs b/src/html/mod.rs index 7ee2f200a80..ab7a89a9362 100644 --- a/src/html/mod.rs +++ b/src/html/mod.rs @@ -50,7 +50,7 @@ pub trait Component: Sized + 'static { /// Called by rendering loop. fn view(&self) -> Html; /// Called for finalization on the final point of the component's lifetime. - fn destroy(&mut self) {} // TODO Replace with `Drop` + fn destroy(&mut self) {} // TODO(#941): Replace with `Drop` } /// A type which expected as a result of `view` function implementation. diff --git a/src/services/reader.rs b/src/services/reader.rs index 8261bfd503d..b30f57a0968 100644 --- a/src/services/reader.rs +++ b/src/services/reader.rs @@ -108,7 +108,7 @@ impl ReaderService { let from = position; let to = cmp::min(position + chunk_size, total_size); position = to; - // TODO Implement `slice` method in `stdweb` + // TODO(#942): Implement `slice` method in `stdweb` let blob: Blob = (js! { return @{file}.slice(@{from as u32}, @{to as u32}); }) diff --git a/src/virtual_dom/mod.rs b/src/virtual_dom/mod.rs index 84dd6d2f07c..6150cc545cd 100644 --- a/src/virtual_dom/mod.rs +++ b/src/virtual_dom/mod.rs @@ -166,7 +166,7 @@ enum Reform { Before(Option), } -// TODO What about to implement `VDiff` for `Element`? +// TODO(#938): What about to implement `VDiff` for `Element`? // In makes possible to include ANY element into the tree. // `Ace` editor embedding for example? diff --git a/src/virtual_dom/vtag.rs b/src/virtual_dom/vtag.rs index f0f0465897c..9f45374aac5 100644 --- a/src/virtual_dom/vtag.rs +++ b/src/virtual_dom/vtag.rs @@ -428,7 +428,7 @@ impl VDiff for VTag { self.apply_diffs(&ancestor); // Every render it removes all listeners and attach it back later - // TODO Compare references of handler to do listeners update better + // TODO(#943): Compare references of handler to do listeners update better if let Some(ancestor) = ancestor.as_mut() { for handle in ancestor.captured.drain(..) { handle.remove();