chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -12,7 +12,7 @@
//! - [`WrapMap`] that handles soft wrapping.
//! - [`BlockMap`] that tracks custom blocks such as diagnostics that should be displayed within buffer.
//! - [`DisplayMap`] that adds background highlights to the regions of text.
//! Each one of those builds on top of preceding map.
//! Each one of those builds on top of preceding map.
//!
//! [Editor]: crate::Editor
//! [EditorElement]: crate::element::EditorElement
@ -588,7 +588,7 @@ impl DisplaySnapshot {
pub fn display_point_to_anchor(&self, point: DisplayPoint, bias: Bias) -> Anchor {
self.buffer_snapshot
.anchor_at(point.to_offset(&self, bias), bias)
.anchor_at(point.to_offset(self, bias), bias)
}
fn display_point_to_inlay_point(&self, point: DisplayPoint, bias: Bias) -> InlayPoint {
@ -735,7 +735,7 @@ impl DisplaySnapshot {
let mut line = String::new();
let range = display_row..display_row.next_row();
for chunk in self.highlighted_chunks(range, false, &editor_style) {
for chunk in self.highlighted_chunks(range, false, editor_style) {
line.push_str(chunk.text);
let text_style = if let Some(style) = chunk.style {
@ -1286,7 +1286,7 @@ pub mod tests {
height,
disposition,
render: Box::new(|_| div().into_any()),
priority: priority,
priority,
}
})
.collect::<Vec<_>>();