This is just nit picking.
This commit is contained in:
@@ -58,7 +58,8 @@ mod tests {
|
||||
fn round_trips_all_variants() {
|
||||
for direction in [Direction::In, Direction::Out] {
|
||||
let encoded = encode_direction(direction).to_owned();
|
||||
assert_eq!(decode_direction(encoded).unwrap(), direction);
|
||||
let decoded = decode_direction(encoded.clone()).unwrap();
|
||||
assert_eq!(decoded, direction);
|
||||
}
|
||||
for unit in [
|
||||
RecurrenceUnit::Day,
|
||||
@@ -67,14 +68,16 @@ mod tests {
|
||||
RecurrenceUnit::Year,
|
||||
] {
|
||||
let encoded = encode_recurrence_unit(unit).to_owned();
|
||||
assert_eq!(decode_recurrence_unit(encoded).unwrap(), unit);
|
||||
let decoded = decode_recurrence_unit(encoded.clone()).unwrap();
|
||||
assert_eq!(decoded, unit);
|
||||
}
|
||||
for adjustment in [
|
||||
WeekendAdjustment::PreviousBusinessDay,
|
||||
WeekendAdjustment::NextBusinessDay,
|
||||
] {
|
||||
let encoded = encode_weekend_adjustment(adjustment).to_owned();
|
||||
assert_eq!(decode_weekend_adjustment(encoded).unwrap(), adjustment);
|
||||
let decoded = decode_weekend_adjustment(encoded.clone()).unwrap();
|
||||
assert_eq!(decoded, adjustment);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ mod tests {
|
||||
#[test]
|
||||
fn round_trips_through_rows() {
|
||||
let user = decode(row()).unwrap();
|
||||
assert_eq!(decode(encode(user.clone())).unwrap(), user);
|
||||
let round_trip = decode(encode(user.clone())).unwrap();
|
||||
assert_eq!(round_trip, user);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user