diff --git a/examples/async-cb/src/lib.rs b/examples/async-cb/src/lib.rs index f4c9c9d7..3c6ba052 100644 --- a/examples/async-cb/src/lib.rs +++ b/examples/async-cb/src/lib.rs @@ -16,4 +16,4 @@ async fn hello(seconds: i32, cb: F) { // println!("woke from time"); cb(10.0, "hello world".to_string()); -} \ No newline at end of file +} diff --git a/examples/js-env/src/lib.rs b/examples/js-env/src/lib.rs index e15d28b2..9497a368 100644 --- a/examples/js-env/src/lib.rs +++ b/examples/js-env/src/lib.rs @@ -21,4 +21,3 @@ impl TryIntoJs for EnvInterceptor { js_env.create_double(self.0 * 2.0) } } - diff --git a/examples/json/src/lib.rs b/examples/json/src/lib.rs index c9e69020..384e562d 100644 --- a/examples/json/src/lib.rs +++ b/examples/json/src/lib.rs @@ -12,12 +12,12 @@ use serde_json::map::Map; #[node_bindgen] struct StandardJson { some_name: String, - a_number: i64 + a_number: i64, } #[node_bindgen] struct Outer { - val: Inner + val: Inner, } #[node_bindgen] @@ -29,19 +29,17 @@ struct UnitStruct; #[node_bindgen] enum ErrorType { WithMessage(String, usize), - WithFields { - val: usize - }, - UnitError + WithFields { val: usize }, + UnitError, } #[node_bindgen] struct WithSerdeJson { - val: Value + val: Value, } struct CustomJson { - val: f64 + val: f64, } impl TryIntoJs for CustomJson { @@ -67,14 +65,14 @@ fn custom_json() -> CustomJson { fn standard_json() -> StandardJson { StandardJson { some_name: "John".to_owned(), - a_number: 1337 + a_number: 1337, } } #[node_bindgen] fn multilevel_json() -> Outer { Outer { - val: Inner("hello".to_owned()) + val: Inner("hello".to_owned()), } } @@ -90,9 +88,7 @@ fn with_message() -> ErrorType { #[node_bindgen] fn with_fields() -> ErrorType { - ErrorType::WithFields { - val: 123 - } + ErrorType::WithFields { val: 123 } } #[node_bindgen] @@ -102,9 +98,7 @@ fn with_unit() -> ErrorType { #[node_bindgen] fn failed_result_with_fields() -> Result<(), ErrorType> { - Err(ErrorType::WithFields { - val: 987 - }) + Err(ErrorType::WithFields { val: 987 }) } #[node_bindgen] @@ -119,6 +113,6 @@ fn with_serde_json() -> WithSerdeJson { map.insert("second".to_owned(), Value::String("hello".to_owned())); WithSerdeJson { - val: Value::Object(map) + val: Value::Object(map), } }