Skip to content

Commit 978186c

Browse files
committed
Run cargo fmt
1 parent e72e40e commit 978186c

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

rust/bufferfish/src/compiler.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! decoders from Rust types annotated with `#[derive(Encode)]` and/or `#[derive
33
//! (Decode]`.
44
use std::{
5-
fs::{create_dir_all, read_dir, File, OpenOptions},
5+
fs::{File, OpenOptions, create_dir_all, read_dir},
66
io::{self, Read, Write},
77
path::Path,
88
};
@@ -376,12 +376,10 @@ fn get_bufferfish_write_fn(ty: Type, value_accessor: &str) -> String {
376376
if is_primitive_type(inner_ty) {
377377
return format!(
378378
"bf.writeUint16({value_accessor}.length)\n for (const item of {value_accessor}) {{\n bf.{inner_write_fn}(item)\n }}",
379-
380379
);
381380
} else {
382381
return format!(
383382
"bf.writeUint16({value_accessor}.length)\n for (const item of {value_accessor}) {{\n {inner_write_fn}(bf, item)\n }}",
384-
385383
);
386384
}
387385
}

rust/bufferfish/src/lib.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ mod tests {
233233

234234
assert_eq!(
235235
bf.as_ref(),
236-
&[0, 0, 0, 0, 73, 150, 2, 210, 127, 255, 255, 255, 128, 0, 0, 0]
236+
&[
237+
0, 0, 0, 0, 73, 150, 2, 210, 127, 255, 255, 255, 128, 0, 0, 0
238+
]
237239
);
238240
}
239241

@@ -394,7 +396,9 @@ mod tests {
394396

395397
assert_eq!(
396398
bf.as_ref(),
397-
&[0, 15, 236, 149, 136, 235, 133, 149, 237, 149, 152, 236, 132, 184, 236, 154, 148]
399+
&[
400+
0, 15, 236, 149, 136, 235, 133, 149, 237, 149, 152, 236, 132, 184, 236, 154, 148
401+
]
398402
)
399403
}
400404

@@ -575,7 +579,9 @@ mod tests {
575579

576580
assert_eq!(
577581
bf.as_ref(),
578-
&[0, 0, 0, 0, 0, 0, 0, 10, 66, 117, 102, 102, 101, 114, 102, 105, 115, 104]
582+
&[
583+
0, 0, 0, 0, 0, 0, 0, 10, 66, 117, 102, 102, 101, 114, 102, 105, 115, 104
584+
]
579585
);
580586
}
581587

0 commit comments

Comments
 (0)