Skip to content

Commit 8cbf0db

Browse files
committed
Fix bug with convert
1 parent 3343e85 commit 8cbf0db

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

tests/convert.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use rstest::rstest;
2+
use time::convert::*;
3+
4+
#[rstest]
5+
fn issue_749() {
6+
assert_eq!(Nanosecond::per(Second), 1_000_000_000u32);
7+
}

tests/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ require_all_features! {
112112
}}
113113
}
114114

115+
mod convert;
115116
mod date;
116117
mod derives;
117118
mod duration;

time-core/src/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ macro_rules! impl_per {
9999
const VALUE: $float_output = $float_value;
100100
})+
101101

102-
impl DefaultOutput<$larger> for $t {
102+
impl DefaultOutput<$t> for $larger {
103103
type Output = $default_output;
104104
}
105105
)+

0 commit comments

Comments
 (0)