Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Silence a couple of noisy logs (#26262)

Cole Millerb0d1024f669d
diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs
index 5fae96b56cc..54f128eca26 100644
--- a/crates/markdown/src/markdown.rs
+++ b/crates/markdown/src/markdown.rs
@@ -736,7 +736,7 @@ impl Element for MarkdownElement {
markdown_end,
);
}
- _ => log::error!("unsupported markdown tag {:?}", tag),
+ _ => log::debug!("unsupported markdown tag {:?}", tag),
}
}
MarkdownEvent::End(tag) => match tag {
@@ -853,7 +853,7 @@ impl Element for MarkdownElement {
MarkdownTagEnd::TableCell => {
builder.pop_div();
}
- _ => log::error!("unsupported markdown tag end: {:?}", tag),
+ _ => log::debug!("unsupported markdown tag end: {:?}", tag),
},
MarkdownEvent::Text(parsed) => {
builder.push_text(parsed, range.start);
diff --git a/crates/multi_buffer/src/multi_buffer.rs b/crates/multi_buffer/src/multi_buffer.rs
index 1d7183532bf..c7f8c5db9ba 100644
--- a/crates/multi_buffer/src/multi_buffer.rs
+++ b/crates/multi_buffer/src/multi_buffer.rs
@@ -3523,10 +3523,7 @@ impl MultiBufferSnapshot {
) -> impl Iterator<Item = MultiBufferDiffHunk> + '_ {
let query_range = range.start.to_point(self)..range.end.to_point(self);
self.lift_buffer_metadata(query_range.clone(), move |buffer, buffer_range| {
- let Some(diff) = self.diffs.get(&buffer.remote_id()) else {
- log::debug!("no diff found for {:?}", buffer.remote_id());
- return None;
- };
+ let diff = self.diffs.get(&buffer.remote_id())?;
let buffer_start = buffer.anchor_before(buffer_range.start);
let buffer_end = buffer.anchor_after(buffer_range.end);
Some(