mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
chore: use #[non_exhaustive] instead of private unit field (#3320)
This commit is contained in:
@@ -42,12 +42,13 @@ use std::io;
|
||||
/// ```
|
||||
///
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
|
||||
pub struct BytesCodec(());
|
||||
#[non_exhaustive]
|
||||
pub struct BytesCodec;
|
||||
|
||||
impl BytesCodec {
|
||||
/// Creates a new `BytesCodec` for shipping around raw bytes.
|
||||
pub fn new() -> BytesCodec {
|
||||
BytesCodec(())
|
||||
BytesCodec
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user