Merge pull request #13 from gh0st42/master

Made crate unsafe free and forbid unsafe
This commit is contained in:
Paul Colomiets
2020-01-19 02:42:51 +02:00
committed by GitHub
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -356,7 +356,7 @@ impl fmt::Display for Rfc3339Timestamp {
};
// we know our chars are all ascii
f.write_str(unsafe { str::from_utf8_unchecked(&buf[..=offset]) })
f.write_str(str::from_utf8(&buf[..=offset]).expect("Conversion to utf8 failed"))
}
}
+1
View File
@@ -15,6 +15,7 @@
//! [serde-humantime]: https://docs.rs/serde-humantime/0.1.1/serde_humantime/
//! [humantime-serde]: https://docs.rs/humantime-serde
#![forbid(unsafe_code)]
#![warn(missing_debug_implementations)]
#![warn(missing_docs)]