Skip to content

Commit

Permalink
fix: Add result handling to builder
Browse files Browse the repository at this point in the history
  • Loading branch information
bahlo committed Oct 8, 2024
1 parent 404a5cb commit a9adc26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ impl<'a> Builder<'a> {
return Err(Error::StartTimeAheadOfCurrentTime(start_time));
}

to_sonyflake_time(start_time)
to_sonyflake_time(start_time)?
} else {
to_sonyflake_time(Utc.with_ymd_and_hms(2014, 9, 1, 0, 0, 0).unwrap())
to_sonyflake_time(Utc.with_ymd_and_hms(2014, 9, 1, 0, 0, 0).unwrap())?
};

let machine_id = if let Some(machine_id) = self.machine_id {
Expand Down

0 comments on commit a9adc26

Please sign in to comment.