Implement Default for Point, Eq for Node
This commit is contained in:
parent
d8c3f472d2
commit
631710bada
1 changed files with 3 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ pub struct Tree(NonNull<ffi::TSTree>);
|
|||
/// A position in a multi-line text document, in terms of rows and columns.
|
||||
///
|
||||
/// Rows and columns are zero-based.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct Point {
|
||||
pub row: usize,
|
||||
pub column: usize,
|
||||
|
|
@ -1001,6 +1001,8 @@ impl<'a> PartialEq for Node<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Eq for Node<'a> {}
|
||||
|
||||
impl<'a> fmt::Debug for Node<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
write!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue