mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
chore: use #[non_exhaustive] instead of private unit field (#3320)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user