tangled
alpha
login
or
join now
sachy.dev
/
sachy-embed-core
0
fork
atom
Repo of no-std crates for my personal embedded projects
0
fork
atom
overview
issues
pulls
pipelines
chore: Extra sntp conversion methods, close on all errors
sachy.dev
2 months ago
45c0bea9
5826f16d
2/2
miri.yml
success
1m 23s
test.yml
success
1m 13s
+6
1 changed file
expand all
collapse all
unified
split
sachy-sntp
src
lib.rs
+6
sachy-sntp/src/lib.rs
···
68
68
}
69
69
70
70
#[cfg(feature = "chrono")]
71
71
+
pub fn try_to_utc(self) -> Result<chrono::DateTime<chrono::Utc>, SntpError> {
72
72
+
self.try_into()
73
73
+
}
74
74
+
75
75
+
#[cfg(feature = "chrono")]
71
76
pub fn try_to_naive_datetime(self) -> Result<chrono::NaiveDateTime, SntpError> {
72
77
self.try_into()
73
78
}
···
189
194
.await
190
195
.map_err(|e| {
191
196
error!("Failed to send: {}", e);
197
197
+
self.close();
192
198
SntpError::NetFailure
193
199
})??;
194
200