Skip to content
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

Merged
merged 2 commits into from
Jun 13, 2017
Merged

Run rustfmt 0.8.6 #205

merged 2 commits into from
Jun 13, 2017

Conversation

philipc
Copy link
Collaborator

@philipc philipc commented Jun 13, 2017

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).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 92.828% when pulling 2151637 on philipc:rustfmt into 0d19c56 on gimli-rs:master.

Copy link
Member

@fitzgen fitzgen left a 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"));
});
Copy link
Member

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)
Copy link
Member

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? ...

Copy link
Collaborator Author

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.

@fitzgen fitzgen merged commit 9f8075d into gimli-rs:master Jun 13, 2017
@philipc philipc deleted the rustfmt branch June 14, 2017 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants