chore: use #[non_exhaustive] instead of private unit field (#3320)

This commit is contained in:
Taiki Endo
2020-12-23 22:48:33 +09:00
committed by GitHub
parent 0deaeb8494
commit 575938d457
15 changed files with 43 additions and 55 deletions
+3 -2
View File
@@ -224,12 +224,13 @@ mod date {
use time::{self, Duration};
pub struct Now(());
#[non_exhaustive]
pub struct Now;
/// Returns a struct, which when formatted, renders an appropriate `Date`
/// header value.
pub fn now() -> Now {
Now(())
Now
}
// Gee Alex, doesn't this seem like premature optimization. Well you see