Skip to content

Commit

Permalink
remove deprecated primitive type
Browse files Browse the repository at this point in the history
  • Loading branch information
thorseraq committed Oct 15, 2023
1 parent fd9243f commit 9f93a77
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/buf/buf_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::buf::{limit, Chain, Limit, UninitSlice};
use crate::buf::{writer, Writer};
use crate::{panic_advance, panic_does_not_fit};

use core::{mem, ptr, usize};
use core::{mem, ptr};

use alloc::{boxed::Box, vec::Vec};

Expand Down Expand Up @@ -1573,7 +1573,7 @@ unsafe impl BufMut for Vec<u8> {
#[inline]
fn remaining_mut(&self) -> usize {
// A vector can never have more than isize::MAX bytes
core::isize::MAX as usize - self.len()
isize::MAX as usize - self.len()
}

#[inline]
Expand Down
2 changes: 1 addition & 1 deletion src/bytes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::iter::FromIterator;
use core::ops::{Deref, RangeBounds};
use core::{cmp, fmt, hash, mem, ptr, slice, usize};
use core::{cmp, fmt, hash, mem, ptr, slice};

use alloc::{
alloc::{dealloc, Layout},
Expand Down
2 changes: 1 addition & 1 deletion src/bytes_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use core::iter::{FromIterator, Iterator};
use core::mem::{self, ManuallyDrop, MaybeUninit};
use core::ops::{Deref, DerefMut};
use core::ptr::{self, NonNull};
use core::{cmp, fmt, hash, isize, slice, usize};
use core::{cmp, fmt, hash, slice};

use alloc::{
borrow::{Borrow, BorrowMut},
Expand Down
1 change: 0 additions & 1 deletion tests/test_buf_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use bytes::buf::UninitSlice;
use bytes::{BufMut, BytesMut};
use core::fmt::Write;
use core::mem::MaybeUninit;
use core::usize;

#[test]
fn test_vec_as_mut_buf() {
Expand Down
2 changes: 0 additions & 2 deletions tests/test_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

use bytes::{Buf, BufMut, Bytes, BytesMut};

use std::usize;

const LONG: &[u8] = b"mary had a little lamb, little lamb, little lamb";
const SHORT: &[u8] = b"hello world";

Expand Down

0 comments on commit 9f93a77

Please sign in to comment.