diff options
Diffstat (limited to 'openpgp/src/types/timestamp.rs')
-rw-r--r-- | openpgp/src/types/timestamp.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/types/timestamp.rs b/openpgp/src/types/timestamp.rs index ceb31ad7..0852184b 100644 --- a/openpgp/src/types/timestamp.rs +++ b/openpgp/src/types/timestamp.rs @@ -328,8 +328,8 @@ impl fmt::Debug for Duration { impl Duration { /// Returns a `Duration` with the given number of seconds. - pub fn seconds(n: u32) -> Duration { - n.into() + pub const fn seconds(n: u32) -> Duration { + Self(n) } /// Returns a `Duration` with the given number of minutes, if |