Skip to content

Fix a few clippy warnings #109

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

Merged
merged 1 commit into from
Oct 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/float/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ macro_rules! add {
// correct result in that case.
if round_guard_sticky > 0x4 { result += one; }
if round_guard_sticky == 0x4 { result += result & one; }
return (<$ty>::from_repr(result.0));

<$ty>::from_repr(result.0)
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/int/udiv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ pub extern "C" fn __udivmoddi4(n: u64, d: u64, rem: Option<&mut u64>) -> u64 {
// 1 <= sr <= u32::bits() - 1
q = n << (u64::bits() - sr);
r = n >> sr;
} else {
if d.high() == 0 {
} else if d.high() == 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just collapses the else { if {} else {} } into else if {} else {}. Apparently GitHub is quite confused by this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CryZe See https://github.com/rust-lang-nursery/compiler-builtins/pull/109/files?w=1
the ?w=1 bit makes the diffing tool ignore whitspace-only changes

// K X
// ---
// 0 K
Expand Down Expand Up @@ -234,7 +233,6 @@ pub extern "C" fn __udivmoddi4(n: u64, d: u64, rem: Option<&mut u64>) -> u64 {
q = n << (u64::bits() - sr);
r = n >> sr;
}
}

// Not a special case
// q and r are initialized with
Expand Down