Skip to content

Commit

Permalink
removes unused enum and modifies doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
desaikd committed Sep 1, 2022
1 parent 9600908 commit 5bff7cc
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/types/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl Timestamp {
}
}

/// Tests the fractional seconds fields of two timestamps for Ion equality. This function will
/// Tests the fractional seconds fields of two timestamps for equality. This function will
/// only be called if both Timestamps have a precision of [Precision::Second].
fn fractional_seconds_equal(&self, other: &Timestamp) -> bool {
use Mantissa::*;
Expand Down Expand Up @@ -584,19 +584,6 @@ impl Ord for Timestamp {
}
}

/// Represents the comparison type that will be used by Ord implementation of [Timestamp].
enum ComparisonType {
// Ion comparison is stricter and it will only considers two timestamps to be equal,
// if they are the same instant with same precision and offset
// following are not equal as per Ion comparison:
// 2000T -> January 1st 2000, year precision, unknown local offset
// 2000-01-01T00:00:00Z -> January 1st 2000, second precision, UTC
Ion,
// Non strict comparison which considers two timestamps to be equal
// if they are same instant of time and ignores the precision and offset
NonStrict,
}

/// Two Timestamps are considered equal (though not necessarily IonEq) if they represent the same
/// instant in time. Precision is ignored. Offsets do not have to match as long as the instants
/// being represented match. Examples:
Expand Down

0 comments on commit 5bff7cc

Please sign in to comment.