Basic side-by-side diff implementation (#43586)
Release Notes: - N/A --------- Co-authored-by: cameron <cameron.studdstreet@gmail.com> Co-authored-by: Cameron <cameron@zed.dev>
This commit is contained in:
co-authored by
cameron
Cameron
parent
ca6e64d451
commit
2e00f40c54
@@ -1,15 +1,22 @@
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
fmt::{self, Debug},
|
||||
ops::{Add, AddAssign, Range, Sub},
|
||||
};
|
||||
|
||||
/// A zero-indexed point in a text buffer consisting of a row and column.
|
||||
#[derive(Clone, Copy, Default, Eq, PartialEq, Debug, Hash)]
|
||||
#[derive(Clone, Copy, Default, Eq, PartialEq, Hash)]
|
||||
pub struct Point {
|
||||
pub row: u32,
|
||||
pub column: u32,
|
||||
}
|
||||
|
||||
impl Debug for Point {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "Point({}:{})", self.row, self.column)
|
||||
}
|
||||
}
|
||||
|
||||
impl Point {
|
||||
pub const MAX: Self = Self {
|
||||
row: u32::MAX,
|
||||
|
||||
Reference in New Issue
Block a user