-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run rustfmt 0.8.6 #205
Run rustfmt 0.8.6 #205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still annoyed with rustfmt
, but its something we ultimately want none the less.
let debug_abbrev = DebugAbbrev::<LittleEndian>::new(&debug_abbrev); | ||
test::black_box(unit.abbreviations(debug_abbrev) | ||
.expect("Should parse abbreviations")); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bleh... I've tried to figure out how to fix this indentation behavior, haven't found anything that quite does the trick.
@@ -152,7 +154,8 @@ fn bench_parsing_line_number_program_opcodes(b: &mut test::Bencher) { | |||
let debug_line = DebugLine::<LittleEndian>::new(&debug_line); | |||
|
|||
b.iter(|| { | |||
let program = debug_line.program(OFFSET, ADDRESS_SIZE, None, None) | |||
let program = debug_line | |||
.program(OFFSET, ADDRESS_SIZE, None, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And why do these ones not get teh same indentation? ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behaviour is controlled by closure_block_indent_threshold
, which defaults to 7 lines. So closures of up to 7 lines use visual, and longer closures use block indent. I'd be happy with a setting that made it use the same indentation always.
Also enable the rustfmt option to convert
try!()
to?
. Note that this does cause a small performance regression in FDE parsing (probably the same issue as rust-lang/rust#37939).