Skip to content

Commit 72c14ee

Browse files
Upgrade to 2021 edition
1 parent 625b632 commit 72c14ee

File tree

5 files changed

+1
-6
lines changed

5 files changed

+1
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "bytes"
55
# - Update CHANGELOG.md.
66
# - Create "v1.x.y" git tag.
77
version = "1.10.1"
8-
edition = "2018"
8+
edition = "2021"
99
rust-version = "1.57"
1010
license = "MIT"
1111
authors = [

src/bytes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use core::iter::FromIterator;
21
use core::mem::{self, ManuallyDrop};
32
use core::ops::{Deref, RangeBounds};
43
use core::ptr::NonNull;

src/bytes_mut.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use core::iter::FromIterator;
21
use core::mem::{self, ManuallyDrop, MaybeUninit};
32
use core::ops::{Deref, DerefMut};
43
use core::ptr::{self, NonNull};

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ fn abort() -> ! {
114114
#[inline(always)]
115115
#[cfg(feature = "std")]
116116
fn saturating_sub_usize_u64(a: usize, b: u64) -> usize {
117-
use core::convert::TryFrom;
118117
match usize::try_from(b) {
119118
Ok(b) => a.saturating_sub(b),
120119
Err(_) => 0,
@@ -124,7 +123,6 @@ fn saturating_sub_usize_u64(a: usize, b: u64) -> usize {
124123
#[inline(always)]
125124
#[cfg(feature = "std")]
126125
fn min_u64_usize(a: u64, b: usize) -> usize {
127-
use core::convert::TryFrom;
128126
match usize::try_from(a) {
129127
Ok(a) => usize::min(a, b),
130128
Err(_) => b,

tests/test_bytes.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ fn fmt() {
8181
#[test]
8282
fn fmt_write() {
8383
use std::fmt::Write;
84-
use std::iter::FromIterator;
8584
let s = String::from_iter((0..10).map(|_| "abcdefg"));
8685

8786
let mut a = BytesMut::with_capacity(64);

0 commit comments

Comments
 (0)