enable if_not_else lint

This commit is contained in:
Charles Hall 2024-05-14 16:50:15 -07:00
parent a32b7c1ac1
commit 623824dc0c
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
6 changed files with 288 additions and 287 deletions

View file

@ -66,10 +66,10 @@ impl Service {
while stack.last().map_or(false, |s| s.is_empty()) {
stack.pop();
}
if !stack.is_empty() {
stack.last_mut().and_then(|s| s.pop())
} else {
if stack.is_empty() {
None
} else {
stack.last_mut().and_then(|s| s.pop())
}
} {
rooms_in_path.push(current_room.clone());