Remove 2 suffix for ui, storybook, text

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Max Brunsfeld
2024-01-03 12:33:51 -08:00
co-authored by Mikayla
parent 0cf65223ce
commit 4305c5fdbe
142 changed files with 106 additions and 5018 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
@@ -5,7 +5,7 @@ use std::ops::Range;
#[derive(Copy, Clone, Debug, PartialEq)]
pub enum SelectionGoal {
None,
HorizontalPosition(f32),
HorizontalPosition(f32), // todo!("Can we use pixels here without adding a runtime gpui dependency?")
HorizontalRange { start: f32, end: f32 },
WrappedHorizontalPosition((u32, f32)),
}
+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 -4
View File
@@ -1189,7 +1189,6 @@ impl Buffer {
self.undo_or_redo(transaction).log_err()
}
#[allow(clippy::needless_collect)]
pub fn undo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec<Operation> {
let transactions = self
.history
@@ -1223,7 +1222,6 @@ impl Buffer {
}
}
#[allow(clippy::needless_collect)]
pub fn redo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec<Operation> {
let transactions = self
.history
@@ -1536,7 +1534,6 @@ impl Buffer {
edits
}
#[allow(clippy::type_complexity)]
pub fn randomly_edit<T>(
&mut self,
rng: &mut T,
@@ -2655,7 +2652,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 {