We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents da77235 + 227d7e5 commit 8b8d748Copy full SHA for 8b8d748
src/date.rs
@@ -356,7 +356,7 @@ impl fmt::Display for Rfc3339Timestamp {
356
};
357
358
// we know our chars are all ascii
359
- f.write_str(unsafe { str::from_utf8_unchecked(&buf[..=offset]) })
+ f.write_str(str::from_utf8(&buf[..=offset]).expect("Conversion to utf8 failed"))
360
}
361
362
src/lib.rs
@@ -15,6 +15,7 @@
15
//! [serde-humantime]: https://docs.rs/serde-humantime/0.1.1/serde_humantime/
16
//! [humantime-serde]: https://docs.rs/humantime-serde
17
18
+#![forbid(unsafe_code)]
19
#![warn(missing_debug_implementations)]
20
#![warn(missing_docs)]
21
0 commit comments