Skip to content

Commit 86399a9

Browse files
committed
Add rustfmt configuration file
1 parent 23b4110 commit 86399a9

File tree

2 files changed

+73
-8
lines changed

2 files changed

+73
-8
lines changed

.rustfmt.toml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
max_width = 100
2+
hard_tabs = false
3+
tab_spaces = 4
4+
newline_style = "Auto"
5+
use_small_heuristics = "Default"
6+
indent_style = "Block"
7+
wrap_comments = false
8+
format_code_in_doc_comments = false
9+
comment_width = 80
10+
normalize_comments = false
11+
normalize_doc_attributes = false
12+
format_strings = false
13+
format_macro_matchers = false
14+
format_macro_bodies = true
15+
empty_item_single_line = true
16+
struct_lit_single_line = true
17+
fn_single_line = false
18+
where_single_line = false
19+
imports_indent = "Block"
20+
imports_layout = "Mixed"
21+
imports_granularity = "Crate"
22+
reorder_imports = true
23+
reorder_modules = true
24+
reorder_impl_items = false
25+
type_punctuation_density = "Wide"
26+
space_before_colon = false
27+
space_after_colon = true
28+
spaces_around_ranges = false
29+
binop_separator = "Front"
30+
remove_nested_parens = true
31+
combine_control_expr = true
32+
overflow_delimited_expr = false
33+
struct_field_align_threshold = 0
34+
enum_discrim_align_threshold = 0
35+
match_arm_blocks = true
36+
force_multiline_blocks = false
37+
fn_args_layout = "Tall"
38+
brace_style = "SameLineWhere"
39+
control_brace_style = "AlwaysSameLine"
40+
trailing_semicolon = true
41+
trailing_comma = "Vertical"
42+
match_block_trailing_comma = false
43+
blank_lines_upper_bound = 1
44+
blank_lines_lower_bound = 0
45+
edition = "2015"
46+
version = "One"
47+
merge_derives = true
48+
use_try_shorthand = false
49+
use_field_init_shorthand = false
50+
force_explicit_abi = true
51+
condense_wildcard_suffixes = false
52+
color = "Auto"
53+
unstable_features = false
54+
disable_all_formatting = false
55+
skip_children = false
56+
hide_parse_errors = false
57+
error_on_line_overflow = false
58+
error_on_unformatted = false
59+
report_todo = "Never"
60+
report_fixme = "Never"
61+
ignore = []
62+
emit_mode = "Files"
63+
make_backup = false

src/lib.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
#[allow(unused_extern_crates)]
66
extern crate rs_libc;
77

8-
use std::any::Any;
9-
use std::boxed::Box;
10-
use std::cell::{RefCell, UnsafeCell};
11-
use std::convert::TryInto;
12-
use std::ffi::{CStr, CString};
13-
use std::marker::PhantomData;
14-
use std::pin::Pin;
15-
use std::ptr::{self, NonNull};
8+
use std::{
9+
any::Any,
10+
boxed::Box,
11+
cell::{RefCell, UnsafeCell},
12+
convert::TryInto,
13+
ffi::{CStr, CString},
14+
marker::PhantomData,
15+
pin::Pin,
16+
ptr::{self, NonNull},
17+
};
1618

1719
use impl_trait_for_tuples::impl_for_tuples;
1820
use thiserror::Error;

0 commit comments

Comments
 (0)