Skip to content

Commit

Permalink
Derive more
Browse files Browse the repository at this point in the history
  • Loading branch information
azdavis committed Mar 5, 2024
1 parent fcef19d commit 572c507
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/text-pos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl PositionDb {
}

/// A pair of `(line, col)` for UTF-8.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct PositionUtf8 {
/// Zero-based.
line: u32,
Expand All @@ -142,7 +142,7 @@ struct PositionUtf8 {
/// A pair of start and end positions for UTF-8.
///
/// `start` comes before `end`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct RangeUtf8 {
/// The start.
start: PositionUtf8,
Expand All @@ -151,7 +151,7 @@ struct RangeUtf8 {
}

/// A pair of `(line, col)` for UTF-16.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PositionUtf16 {
/// Zero-based.
pub line: u32,
Expand All @@ -168,7 +168,7 @@ impl fmt::Display for PositionUtf16 {
/// A pair of start and end positions for UTF-16.
///
/// `start` comes before `end`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct RangeUtf16 {
/// The start.
pub start: PositionUtf16,
Expand Down

0 comments on commit 572c507

Please sign in to comment.