chiark / gitweb /
formatting, some from rustfmt (manually picked)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Dec 2020 01:55:38 +0000 (01:55 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 6 Dec 2020 01:55:38 +0000 (01:55 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
wasm/wasm.rs
zcoord/misc.rs

index 6d7880d6dbc9c3bc9c3572e4614ebf4519a246e5..c213b571f1f78f1eae5ad92200a23aca162e5d40 100644 (file)
@@ -3,12 +3,13 @@
 // There is NO WARRANTY.
 
 use std::fmt::Display;
+
 use fehler::throws;
 use js_sys::JsString;
 use thiserror::Error;
 use wasm_bindgen::prelude::*;
 
-use zcoord::{ZCoord,Mutable};
+use zcoord::{Mutable,ZCoord};
 
 #[derive(Error,Clone,Copy,Debug,Eq,PartialEq)]
 #[error("packed Z coordinate wrong JS type (not a string)")]
@@ -53,12 +54,12 @@ pub fn increment(packed: &JsValue) -> JsValue {
 
 #[wasm_bindgen]
 pub fn def_zcoord() -> JsValue {
-  let z : ZCoord = Default::default();
+  let z: ZCoord = Default::default();
   z.to_string().into()
 }
 
 #[wasm_bindgen]
-pub struct ZCoordIterator (zcoord::BoxedIterator);
+pub struct ZCoordIterator(zcoord::BoxedIterator);
 
 #[throws(JsValue)]
 #[wasm_bindgen]
@@ -74,7 +75,7 @@ pub fn range(a: &JsValue, b: &JsValue, count: zcoord::RangeCount)
 
   let a = get1(a)?;
   let b = get1(b)?;
-  let inner = Mutable::some_range(a.as_ref(),b.as_ref(),count).e()?;
+  let inner = Mutable::some_range(a.as_ref(), b.as_ref(), count).e()?;
   ZCoordIterator(inner)
 }
 
index 241529357df52b0aa1bc3269e20352eb881b54d2..842273ea4fa61b55a62d2fbd48dca6aa20a5229a 100644 (file)
@@ -5,8 +5,8 @@
 // This is in this crate for convenience, not because it's to do with
 // Z coordinates.
 
-use if_chain::if_chain;
 use arrayvec::ArrayVec;
+use if_chain::if_chain;
 
 pub fn timestring_abbreviate<'x>(base: &str, this: &'x str)
                                  -> (&'x str, bool)