Skip to content

Commit a4e8354

Browse files
committed
fix-new: Add Explicit Reference in From<LVTime>
I think this is causing a stack overflow in the ubuntu tests.
1 parent 3916c64 commit a4e8354

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

labview-interop/src/types/timestamp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl LVTime {
7474
pub const fn from_parts(seconds: i64, fractions: u64) -> Self {
7575
Self {
7676
seconds,
77-
fractions,
77+
fractions,
7878
}
7979
}
8080

@@ -145,14 +145,14 @@ mod chrono {
145145
.ok_or(LVTimeError::ChronoOutOfRange)
146146
}
147147
}
148-
148+
149149
/// Implementation for owned types as well. Probably rarer but kept for backwards
150150
/// compatability.
151151
impl TryFrom<LVTime> for DateTime<Utc> {
152152
type Error = LVTimeError;
153153

154154
fn try_from(value: LVTime) -> Result<Self, Self::Error> {
155-
value.try_into()
155+
(&value).try_into()
156156
}
157157
}
158158

@@ -237,4 +237,4 @@ mod chrono_tests {
237237
let lv_time_round_trip = date_time.into();
238238
assert_eq!(lv_time, lv_time_round_trip);
239239
}
240-
}
240+
}

0 commit comments

Comments
 (0)