Skip to content

Commit

Permalink
chore: fix some typos
Browse files Browse the repository at this point in the history
Signed-off-by: avoidalone <[email protected]>
  • Loading branch information
avoidalone authored and pitdicker committed Mar 11, 2024
1 parent 2486833 commit 920e73b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/datetime/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ fn signed_duration_since_autoref() {
let diff2 = dt2.signed_duration_since(&dt1); // Take by reference
assert_eq!(diff1, -diff2);

let diff1 = dt1 - &dt2; // We can choose to substract rhs by reference
let diff1 = dt1 - &dt2; // We can choose to subtract rhs by reference
let diff2 = dt2 - dt1; // Or consume rhs
assert_eq!(diff1, -diff2);
}
Expand Down
2 changes: 1 addition & 1 deletion src/naive/datetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ impl NaiveDateTime {
/// This can fail in cases where the local time represented by the `NaiveDateTime`
/// is not a valid local timestamp in the target timezone due to an offset transition
/// for example if the target timezone had a change from +00:00 to +01:00
/// occuring at 2015-09-05 22:59:59, then a local time of 2015-09-05 23:56:04
/// occurring at 2015-09-05 22:59:59, then a local time of 2015-09-05 23:56:04
/// could never occur. Similarly, if the offset transitioned in the opposite direction
/// then there would be two local times of 2015-09-05 23:56:04, one at +00:00 and one
/// at +01:00.
Expand Down
2 changes: 1 addition & 1 deletion src/offset/local/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn offset(d: &NaiveDateTime, local: bool) -> LocalResult<FixedOffset> {
}

// we have to store the `Cache` in an option as it can't
// be initalized in a static context.
// be initialized in a static context.
thread_local! {
static TZ_INFO: RefCell<Option<Cache>> = Default::default();
}
Expand Down
2 changes: 1 addition & 1 deletion src/offset/local/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ mod tests {
SystemTimeToFileTime(st, init.as_mut_ptr());
}
// SystemTimeToFileTime must have succeeded at this point, so we can assume the value is
// initalized.
// initialized.
let filetime = unsafe { init.assume_init() };
let bit_shift =
((filetime.dwHighDateTime as u64) << 32) | (filetime.dwLowDateTime as u64);
Expand Down
4 changes: 2 additions & 2 deletions tests/dateutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ fn verify_against_date_command_local(path: &'static str, dt: NaiveDateTime) {
// assert_eq!("", date_command_str);
// }

// This is used while a decision is made wheter the `date` output needs to
// be exactly matched, or whether LocalResult::Ambigious should be handled
// This is used while a decision is made whether the `date` output needs to
// be exactly matched, or whether LocalResult::Ambiguous should be handled
// differently

let date = NaiveDate::from_ymd_opt(dt.year(), dt.month(), dt.day()).unwrap();
Expand Down

0 comments on commit 920e73b

Please sign in to comment.