Skip to content

Commit

Permalink
Adding .rustfmt.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pebaz committed Jun 8, 2022
1 parent 9935b17 commit 48bc96f
Show file tree
Hide file tree
Showing 11 changed files with 894 additions and 3,609 deletions.
32 changes: 32 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=

# indent_style = "Block"
# reorder_imports = false

use_small_heuristics = "Off"
comment_width = 120
max_width = 120
fn_call_width = 120
attr_fn_like_width = 120
struct_lit_width = 120
struct_variant_width = 120
array_width = 120
chain_width = 120
single_line_if_else_max_width = 120

reorder_impl_items = true
reorder_imports = true
group_imports = "StdExternalCrate"

merge_derives = true
indent_style = "Block"
brace_style = "AlwaysNextLine"
control_brace_style = "AlwaysNextLine"
combine_control_expr = false
fn_args_layout = "Tall"
condense_wildcard_suffixes = true
spaces_around_ranges = true
wrap_comments = true
blank_lines_upper_bound = 1
newline_style = "Unix"
overflow_delimited_expr = true
25 changes: 5 additions & 20 deletions src/argument.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,15 @@ impl Emit for Argument
format!("{}", natural_index.emit(options))
}

Self::ImmediateU16(immediate) =>
{
color_immediate(immediate.to_string(), options)
}
Self::ImmediateU16(immediate) => color_immediate(immediate.to_string(), options),

Self::ImmediateU32(immediate) =>
{
color_immediate(immediate.to_string(), options)
}
Self::ImmediateU32(immediate) => color_immediate(immediate.to_string(), options),

Self::ImmediateI16(immediate) =>
{
color_immediate(immediate.to_string(), options)
}
Self::ImmediateI16(immediate) => color_immediate(immediate.to_string(), options),

Self::ImmediateI32(immediate) =>
{
color_immediate(immediate.to_string(), options)
}
Self::ImmediateI32(immediate) => color_immediate(immediate.to_string(), options),

Self::ImmediateI64(immediate) =>
{
color_immediate(immediate.to_string(), options)
}
Self::ImmediateI64(immediate) => color_immediate(immediate.to_string(), options),
}
}
}
1 change: 0 additions & 1 deletion src/bits.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

pub fn bits_u16(byte: u16) -> [bool; 16]
{
let mut bits = [false; 16];
Expand Down
Loading

0 comments on commit 48bc96f

Please sign in to comment.