Skip to content

Commit edabcdd

Browse files
committed
Apply clippy::let_and_return suggestion
1 parent 7f4aba4 commit edabcdd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcore/slice/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3026,8 +3026,7 @@ macro_rules! len {
30263026
if size == 0 {
30273027
// This _cannot_ use `unchecked_sub` because we depend on wrapping
30283028
// to represent the length of long ZST slice iterators.
3029-
let diff = ($self.end as usize).wrapping_sub(start as usize);
3030-
diff
3029+
($self.end as usize).wrapping_sub(start as usize)
30313030
} else {
30323031
// We know that `start <= end`, so can do better than `offset_from`,
30333032
// which needs to deal in signed. By setting appropriate flags here

0 commit comments

Comments
 (0)