From f4511a487ffe828f9d2de127f166c6f0865b6c6e Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 8 Jan 2024 14:10:30 -0700 Subject: [PATCH] Clean up rustfmt options, and format --- rustfmt.toml | 35 ++++++++++++++++------------------- src/io/mod.rs | 4 +++- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index 880d52b6a9..3c4f56848f 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,24 +1,21 @@ -max_width = 100 -hard_tabs = false -tab_spaces = 4 -newline_style = "Unix" -indent_style = "Block" -format_strings = false +blank_lines_lower_bound = 0 +blank_lines_upper_bound = 1 +brace_style = "SameLineWhere" +disable_all_formatting = false +edition = "2018" empty_item_single_line = true fn_single_line = false -where_single_line = false +force_explicit_abi = true +format_strings = false +hard_tabs = false +hide_parse_errors = false +imports_granularity = "Crate" imports_indent = "Block" imports_layout = "Mixed" -fn_args_density = "Tall" -brace_style = "SameLineWhere" -trailing_comma = "Vertical" -blank_lines_upper_bound = 1 -blank_lines_lower_bound = 0 -force_explicit_abi = true -disable_all_formatting = false +indent_style = "Block" +max_width = 100 +newline_style = "Unix" skip_children = false -hide_parse_errors = false -report_todo = "Never" -report_fixme = "Never" -edition = "2018" -merge_imports = true +tab_spaces = 4 +trailing_comma = "Vertical" +where_single_line = false diff --git a/src/io/mod.rs b/src/io/mod.rs index b4614e3bdb..dedff24c24 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -294,7 +294,9 @@ struct Guard<'a> { impl<'a> Drop for Guard<'a> { fn drop(&mut self) { - unsafe { self.buf.set_len(self.len); } + unsafe { + self.buf.set_len(self.len); + } } }