Skip to content

Commit 40769db

Browse files
kinto0meta-codesync[bot]
authored andcommitted
fix lint warning
Summary: nested if branch can be collapsed Reviewed By: jvansch1 Differential Revision: D87237951 fbshipit-source-id: 1501c3a8b43c65b55b7ad8ada62de1cf121a0d6b
1 parent bfb716a commit 40769db

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pyrefly/lib/lsp/non_wasm/server.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,11 +2260,11 @@ impl Server {
22602260
// Group consecutive implementations by module, preserving the sorted order
22612261
let mut grouped: Vec<(ModuleInfo, Vec<TextRange>)> = Vec::new();
22622262
for impl_with_module in implementations {
2263-
if let Some((last_module, ranges)) = grouped.last_mut() {
2264-
if last_module.path() == impl_with_module.module.path() {
2265-
ranges.push(impl_with_module.range);
2266-
continue;
2267-
}
2263+
if let Some((last_module, ranges)) = grouped.last_mut()
2264+
&& last_module.path() == impl_with_module.module.path()
2265+
{
2266+
ranges.push(impl_with_module.range);
2267+
continue;
22682268
}
22692269
grouped.push((impl_with_module.module, vec![impl_with_module.range]));
22702270
}

0 commit comments

Comments
 (0)