Skip to content

Commit

Permalink
make arg order consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
rinde committed Apr 3, 2024
1 parent d63031d commit 60533a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,12 @@ impl TimeWindow {
/// # Examples
/// ```
/// # use tinytime::*;
/// let mut x = TimeWindow::from_length_starting_at(Time::seconds(1), Duration::seconds(2));
/// let mut x = TimeWindow::from_length_starting_at(Duration::seconds(2), Time::seconds(1));
/// assert_eq!(Time::seconds(1), x.start());
/// assert_eq!(Time::seconds(3), x.end());
/// ```
#[must_use]
pub fn from_length_starting_at(start: Time, length: Duration) -> Self {
pub fn from_length_starting_at(length: Duration, start: Time) -> Self {
TimeWindow::new(start, start.add(length))
}

Expand Down

0 comments on commit 60533a8

Please sign in to comment.