Skip to content

Commit

Permalink
Apply clippy::let_and_return suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
mati865 committed Aug 22, 2019
1 parent 7f4aba4 commit edabcdd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libcore/slice/mod.rs
Expand Up @@ -3026,8 +3026,7 @@ macro_rules! len {
if size == 0 {
// This _cannot_ use `unchecked_sub` because we depend on wrapping
// to represent the length of long ZST slice iterators.
let diff = ($self.end as usize).wrapping_sub(start as usize);
diff
($self.end as usize).wrapping_sub(start as usize)
} else {
// We know that `start <= end`, so can do better than `offset_from`,
// which needs to deal in signed. By setting appropriate flags here
Expand Down

0 comments on commit edabcdd

Please sign in to comment.