Skip to content

Commit 22145af

Browse files
committed
Run cargo fmt
1 parent 1db0d81 commit 22145af

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

rustler/src/thread.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::env::OwnedEnv;
2-
use std::panic;
3-
use std::thread;
42
use crate::types::atom::Atom;
53
use crate::{Encoder, Env, Term};
4+
use std::panic;
5+
use std::thread;
66

77
/// A `JobSpawner` is a value that can run Rust code on non-Erlang system threads.
88
/// Abstracts away details of thread management for `spawn()`.

rustler/src/types/binary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use crate::wrapper::binary::{alloc, realloc, ErlNifBinary};
22
use crate::{Decoder, Encoder, Env, Error, NifResult, Term};
33

4-
use std::mem::MaybeUninit;
54
use std::borrow::{Borrow, BorrowMut};
65
use std::io::Write;
6+
use std::mem::MaybeUninit;
77
use std::ops::{Deref, DerefMut};
88

99
// Owned

rustler_codegen/src/ex_struct.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ pub fn gen_decoder(
8383
let ident = field.ident.as_ref().unwrap();
8484
let ident_str = ident.to_string();
8585
let atom_fun = Ident::new(&format!("atom_{}", ident_str), Span::call_site());
86-
let error_message = format!("Could not decode field :{} on %{}{{}}", ident.to_string(), struct_name.to_string());
86+
let error_message = format!(
87+
"Could not decode field :{} on %{}{{}}",
88+
ident.to_string(),
89+
struct_name.to_string()
90+
);
8791
quote! {
8892
#ident: match ::rustler::Decoder::decode(term.map_get(#atom_fun().encode(env))?) {
8993
Err(_) => return Err(::rustler::Error::RaiseTerm(Box::new(#error_message))),

rustler_sys/src/initmacro.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ mod initmacro_namespace_tests {
350350
});
351351
assert_eq!(0, funcs[0].flags);
352352
}
353-
354353
}
355354

356355
#[cfg(test)]
@@ -629,5 +628,4 @@ mod initmacro_tests {
629628
});
630629
assert_eq!(0, funcs[0].flags);
631630
}
632-
633631
}

0 commit comments

Comments
 (0)