// 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)")]
#[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]
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)
}
// 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)