Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/practice/gigasecond/.docs/instructions.append.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## The time crate

If you're unsure what operations you can perform on `PrimitiveDateTime` take a look at the [time crate](https://docs.rs/time) which is listed as a dependency in the `Cargo.toml` file for this exercise.
If you're unsure what operations you can perform on `PlainDateTime`, take a look at the [time crate](https://docs.rs/time) which is listed as a dependency in the `Cargo.toml` file for this exercise.
2 changes: 1 addition & 1 deletion exercises/practice/gigasecond/.meta/example.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use time::{Duration, PrimitiveDateTime as DateTime};
use time::{Duration, PlainDateTime as DateTime};

pub fn after(start: DateTime) -> DateTime {
start + Duration::seconds(1_000_000_000)
Expand Down
6 changes: 3 additions & 3 deletions exercises/practice/gigasecond/.meta/test_template.tera
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ fn {{ test.description | make_ident }}() {
}
{% endfor %}

fn datetime(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8) -> time::PrimitiveDateTime {
use time::{Date, PrimitiveDateTime, Time};
fn datetime(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8) -> time::PlainDateTime {
use time::{Date, PlainDateTime, Time};

PrimitiveDateTime::new(
PlainDateTime::new(
Date::from_calendar_date(year, month.try_into().unwrap(), day).unwrap(),
Time::from_hms(hour, minute, second).unwrap(),
)
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/gigasecond/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use time::PrimitiveDateTime as DateTime;
use time::PlainDateTime as DateTime;

// Returns a DateTime one billion seconds after start.
pub fn after(start: DateTime) -> DateTime {
Expand Down
6 changes: 3 additions & 3 deletions exercises/practice/gigasecond/tests/gigasecond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ fn datetime(
hour: u8,
minute: u8,
second: u8,
) -> time::PrimitiveDateTime {
use time::{Date, PrimitiveDateTime, Time};
) -> time::PlainDateTime {
use time::{Date, PlainDateTime, Time};

PrimitiveDateTime::new(
PlainDateTime::new(
Date::from_calendar_date(year, month.try_into().unwrap(), day).unwrap(),
Time::from_hms(hour, minute, second).unwrap(),
)
Expand Down
Loading