mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 05:04:24 +00:00
Apply clippy::let_and_return suggestion
This commit is contained in:
parent
7f4aba40fc
commit
edabcddf4d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user