Remove unnecessary Option from functions querying buffer outline (#37935)

`None` case wasn't being used

Release Notes:

- N/A
This commit is contained in:
Michael Sloan
2025-09-10 18:21:51 +00:00
committed by GitHub
parent b28c979aae
commit 441a934d84
13 changed files with 40 additions and 65 deletions
+3 -4
View File
@@ -201,10 +201,9 @@ impl FileContextHandle {
parse_status.changed().await.log_err();
}
if let Ok(snapshot) = buffer.read_with(cx, |buffer, _| buffer.snapshot())
&& let Some(outline) = snapshot.outline(None)
{
let items = outline
if let Ok(snapshot) = buffer.read_with(cx, |buffer, _| buffer.snapshot()) {
let items = snapshot
.outline(None)
.items
.into_iter()
.map(|item| item.to_point(&snapshot));