chore: fix clippy lints for rope2, sum_tree, text2 and util
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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>>) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user