diff options
author | 2020-05-22 13:17:30 +0900 | |
---|---|---|
committer | 2020-05-22 13:17:30 +0900 | |
commit | 1fbf83816b60fbaa2f9e85585338138c3efa949f (patch) | |
tree | 859b49f1db1bf180a58045772f585b2ad5909379 /src/buf/ext/mod.rs | |
parent | 5e93fa4c6b3d6209329a3a9c90c6823886affea1 (diff) | |
download | bytes-1fbf83816b60fbaa2f9e85585338138c3efa949f.tar.gz bytes-1fbf83816b60fbaa2f9e85585338138c3efa949f.tar.zst bytes-1fbf83816b60fbaa2f9e85585338138c3efa949f.zip |
Format with rustfmt (#389)
* Format with rustfmt
* Add rustfmt check to CI
Diffstat (limited to 'src/buf/ext/mod.rs')
-rw-r--r-- | src/buf/ext/mod.rs | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/buf/ext/mod.rs b/src/buf/ext/mod.rs index 7b0bdab..7d61814 100644 --- a/src/buf/ext/mod.rs +++ b/src/buf/ext/mod.rs @@ -10,9 +10,9 @@ mod take; #[cfg(feature = "std")] mod writer; +pub use self::chain::Chain; pub use self::limit::Limit; pub use self::take::Take; -pub use self::chain::Chain; #[cfg(feature = "std")] pub use self::{reader::Reader, writer::Writer}; @@ -41,7 +41,8 @@ pub trait BufExt: Buf { /// assert_eq!(dst, b" world"); /// ``` fn take(self, limit: usize) -> Take<Self> - where Self: Sized + where + Self: Sized, { take::new(self, limit) } @@ -62,7 +63,8 @@ pub trait BufExt: Buf { /// assert_eq!(full.bytes(), b"hello world"); /// ``` fn chain<U: Buf>(self, next: U) -> Chain<Self, U> - where Self: Sized + where + Self: Sized, { Chain::new(self, next) } @@ -91,7 +93,10 @@ pub trait BufExt: Buf { /// assert_eq!(&dst[..11], &b"hello world"[..]); /// ``` #[cfg(feature = "std")] - fn reader(self) -> Reader<Self> where Self: Sized { + fn reader(self) -> Reader<Self> + where + Self: Sized, + { reader::new(self) } } @@ -114,7 +119,8 @@ pub trait BufMutExt: BufMut { /// assert_eq!(dst.remaining_mut(), 10); /// ``` fn limit(self, limit: usize) -> Limit<Self> - where Self: Sized + where + Self: Sized, { limit::new(self, limit) } @@ -142,7 +148,10 @@ pub trait BufMutExt: BufMut { /// assert_eq!(*buf, b"hello world"[..]); /// ``` #[cfg(feature = "std")] - fn writer(self) -> Writer<Self> where Self: Sized { + fn writer(self) -> Writer<Self> + where + Self: Sized, + { writer::new(self) } @@ -167,7 +176,8 @@ pub trait BufMutExt: BufMut { /// assert_eq!(&b[..], b" world"); /// ``` fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U> - where Self: Sized + where + Self: Sized, { Chain::new(self, next) } |