chore: fix clippy lints for rope2, sum_tree, text2 and util

This commit is contained in:
Piotr Osiewicz
2024-01-01 23:50:14 +01:00
parent 219999cd8d
commit 4fa28b3de2
6 changed files with 10 additions and 12 deletions
+2 -2
View File
@@ -20,11 +20,11 @@ impl Locator {
}
pub fn min_ref() -> &'static Self {
&*MIN
&MIN
}
pub fn max_ref() -> &'static Self {
&*MAX
&MAX
}
pub fn assign(&mut self, other: &Self) {
+1 -1
View File
@@ -18,7 +18,7 @@ impl Topic {
}
pub fn publish(&self, edits: impl Clone + IntoIterator<Item = Edit<usize>>) {
publish(&mut *self.0.lock(), edits);
publish(&mut self.0.lock(), edits);
}
pub fn publish_mut(&mut self, edits: impl Clone + IntoIterator<Item = Edit<usize>>) {
+1 -1
View File
@@ -2655,7 +2655,7 @@ impl LineEnding {
max_ix -= 1;
}
if let Some(ix) = text[..max_ix].find(&['\n']) {
if let Some(ix) = text[..max_ix].find(['\n']) {
if ix > 0 && text.as_bytes()[ix - 1] == b'\r' {
Self::Windows
} else {