Update Bytes to Rust 2018 (#274)

This commit is contained in:
Taiki Endo
2019-07-26 05:01:22 +09:00
committed by GitHub
parent ecdde1a996
commit ae7d884582
28 changed files with 62 additions and 72 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ use std::fmt;
/// `BsDebug` is not a part of public API of bytes crate.
pub struct BsDebug<'a>(pub &'a [u8]);
impl<'a> fmt::Debug for BsDebug<'a> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
impl fmt::Debug for BsDebug<'_> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
write!(fmt, "b\"")?;
for &c in self.0 {
// https://doc.rust-lang.org/reference.html#byte-escapes