Remove 2 suffix for ui, storybook, text
Co-authored-by: Mikayla <mikayla@zed.dev>
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) {
|
||||
|
||||
@@ -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)),
|
||||
}
|
||||
|
||||
@@ -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>>) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user