Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Buf tests #747

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paolobarbolini
Copy link
Contributor

@paolobarbolini paolobarbolini commented Nov 24, 2024

After playing around with cargo-mutants I got confirmation that multiple bytes APIs are not tested, which in the past have lead to things like #138, b4ebe84 and #730. This general way of testing also makes it easier to test specializations like #481, which may be interesting to implement for some types in the future.

I've also conservatively deleted tests for things I could confirm were covered by the new ones.

This also increases test coverage from 67.2% to 72.2%.

If we like this approach the same could be done for BufMut.

`cargo-mutants` missed.txt output

master

src/buf/buf_impl.rs:1443:9: replace <impl Buf for std::io::Cursor<T>>::remaining -> usize with 0
src/buf/buf_impl.rs:1443:9: replace <impl Buf for std::io::Cursor<T>>::remaining -> usize with 1
src/buf/buf_impl.rs:1455:9: replace <impl Buf for std::io::Cursor<T>>::advance with ()
src/buf/buf_impl.rs:1460:16: replace > with < in <impl Buf for std::io::Cursor<T>>::advance
src/buf/buf_impl.rs:1460:16: replace > with == in <impl Buf for std::io::Cursor<T>>::advance
src/buf/buf_impl.rs:1466:31: replace + with * in <impl Buf for std::io::Cursor<T>>::advance
src/buf/buf_impl.rs:1466:31: replace + with - in <impl Buf for std::io::Cursor<T>>::advance
src/buf/buf_impl.rs:277:29: replace < with > in Buf::copy_to_slice
src/buf/buf_impl.rs:334:29: replace < with == in Buf::get_i8
src/buf/buf_mut.rs:287:33: replace < with == in BufMut::put_bytes
src/buf/buf_mut.rs:287:33: replace < with > in BufMut::put_bytes
src/buf/buf_mut.rs:287:9: replace BufMut::put_bytes with ()
src/buf/buf_mut.rs:291:19: replace > with < in BufMut::put_bytes
src/buf/buf_mut.rs:291:19: replace > with == in BufMut::put_bytes
src/buf/buf_mut.rs:298:17: replace -= with += in BufMut::put_bytes
src/buf/buf_mut.rs:298:17: replace -= with /= in BufMut::put_bytes
src/buf/chain.rs:159:17: replace -= with += in <impl Buf for Chain<T, U>>::advance
src/buf/chain.rs:159:17: replace -= with /= in <impl Buf for Chain<T, U>>::advance
src/buf/limit.rs:45:9: replace Limit<T>::limit -> usize with 0
src/buf/limit.rs:45:9: replace Limit<T>::limit -> usize with 1
src/buf/limit.rs:55:9: replace Limit<T>::set_limit with ()
src/buf/take.rs:152:20: replace -= with += in <impl Buf for Take<T>>::copy_to_bytes
src/buf/take.rs:152:20: replace -= with /= in <impl Buf for Take<T>>::copy_to_bytes
src/buf/uninit_slice.rs:212:9: replace <impl Debug for UninitSlice>::fmt -> fmt::Result with Ok(Default::default())
src/bytes.rs:1012:49: replace | with ^ in <impl From for Bytes>::from
src/bytes.rs:1054:9: replace <impl From for Bytes>::from -> Bytes with Default::default()
src/bytes.rs:1069:9: replace <impl Debug for Vtable>::fmt -> fmt::Result with Ok(Default::default())
src/bytes.rs:1362:9: replace <impl Drop for Shared>::drop with ()
src/bytes.rs:1370:17: replace - with +
src/bytes.rs:1370:17: replace - with /
src/bytes.rs:1603:5: replace ptr_map -> *mut u8 with Default::default()
src/bytes.rs:180:9: replace Bytes::from_static -> Self with Default::default()
src/bytes.rs:319:9: replace Bytes::is_empty -> bool with true
src/bytes.rs:598:49: replace == with != in Bytes::truncate
src/bytes.rs:749:9: replace <impl Hash for Bytes>::hash with ()
src/bytes.rs:755:9: replace <impl Borrow for Bytes>::borrow -> &[u8] with Vec::leak(Vec::new())
src/bytes.rs:773:9: replace <impl IntoIterator for &'a Bytes>::into_iter -> Self::IntoIter with Default::default()
src/bytes.rs:779:9: replace <impl FromIterator for Bytes>::from_iter -> Self with Default::default()
src/bytes.rs:787:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:793:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:807:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:813:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:819:9: replace <impl PartialEq for [u8]>::eq -> bool with true
src/bytes.rs:825:9: replace <impl PartialOrd for [u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:831:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:837:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:843:16: replace == with != in <impl PartialEq for str>::eq
src/bytes.rs:843:9: replace <impl PartialEq for str>::eq -> bool with false
src/bytes.rs:843:9: replace <impl PartialEq for str>::eq -> bool with true
src/bytes.rs:849:9: replace <impl PartialOrd for str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:855:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:861:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:867:9: replace <impl PartialEq for Vec<u8>>::eq -> bool with true
src/bytes.rs:873:9: replace <impl PartialOrd for Vec<u8>>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:879:15: replace == with != in <impl PartialEq for Bytes>::eq
src/bytes.rs:879:9: replace <impl PartialEq for Bytes>::eq -> bool with false
src/bytes.rs:879:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:885:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:891:16: replace == with != in <impl PartialEq for String>::eq
src/bytes.rs:891:9: replace <impl PartialEq for String>::eq -> bool with false
src/bytes.rs:891:9: replace <impl PartialEq for String>::eq -> bool with true
src/bytes.rs:897:9: replace <impl PartialOrd for String>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:903:9: replace <impl PartialEq for &[u8]>::eq -> bool with true
src/bytes.rs:909:9: replace <impl PartialOrd for &[u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:915:16: replace == with != in <impl PartialEq for &str>::eq
src/bytes.rs:915:9: replace <impl PartialEq for &str>::eq -> bool with false
src/bytes.rs:915:9: replace <impl PartialEq for &str>::eq -> bool with true
src/bytes.rs:921:9: replace <impl PartialOrd for &str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:930:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:939:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:110:39: replace >> with <<
src/bytes_mut.rs:1167:9: replace <impl Buf for BytesMut>::copy_to_bytes -> Bytes with Default::default()
src/bytes_mut.rs:1284:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1308:9: replace <impl Hash for BytesMut>::hash with ()
src/bytes_mut.rs:1315:9: replace <impl Borrow for BytesMut>::borrow -> &[u8] with Vec::leak(Vec::new())
src/bytes_mut.rs:1315:9: replace <impl Borrow for BytesMut>::borrow -> &[u8] with Vec::leak(vec![0])
src/bytes_mut.rs:1315:9: replace <impl Borrow for BytesMut>::borrow -> &[u8] with Vec::leak(vec![1])
src/bytes_mut.rs:1321:9: replace <impl BorrowMut for BytesMut>::borrow_mut -> &mut[u8] with Vec::leak(Vec::new())
src/bytes_mut.rs:1321:9: replace <impl BorrowMut for BytesMut>::borrow_mut -> &mut[u8] with Vec::leak(vec![0])
src/bytes_mut.rs:1321:9: replace <impl BorrowMut for BytesMut>::borrow_mut -> &mut[u8] with Vec::leak(vec![1])
src/bytes_mut.rs:1344:9: replace <impl Clone for BytesMut>::clone -> BytesMut with Default::default()
src/bytes_mut.rs:1406:9: replace <impl FromIterator for BytesMut>::from_iter -> Self with Default::default()
src/bytes_mut.rs:1412:9: replace <impl FromIterator for BytesMut>::from_iter -> Self with Default::default()
src/bytes_mut.rs:1560:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1566:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1572:9: replace <impl PartialEq for [u8]>::eq -> bool with true
src/bytes_mut.rs:1578:9: replace <impl PartialOrd for [u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1584:17: replace == with != in <impl PartialEq for BytesMut>::eq
src/bytes_mut.rs:1584:9: replace <impl PartialEq for BytesMut>::eq -> bool with false
src/bytes_mut.rs:1584:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1590:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1596:16: replace == with != in <impl PartialEq for str>::eq
src/bytes_mut.rs:1596:9: replace <impl PartialEq for str>::eq -> bool with false
src/bytes_mut.rs:1596:9: replace <impl PartialEq for str>::eq -> bool with true
src/bytes_mut.rs:1602:9: replace <impl PartialOrd for str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1608:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1614:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1620:9: replace <impl PartialEq for Vec<u8>>::eq -> bool with true
src/bytes_mut.rs:1626:9: replace <impl PartialOrd for Vec<u8>>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1632:15: replace == with != in <impl PartialEq for BytesMut>::eq
src/bytes_mut.rs:1632:9: replace <impl PartialEq for BytesMut>::eq -> bool with false
src/bytes_mut.rs:1632:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1638:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1644:16: replace == with != in <impl PartialEq for String>::eq
src/bytes_mut.rs:1644:9: replace <impl PartialEq for String>::eq -> bool with false
src/bytes_mut.rs:1644:9: replace <impl PartialEq for String>::eq -> bool with true
src/bytes_mut.rs:1650:9: replace <impl PartialOrd for String>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1659:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1668:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1674:9: replace <impl PartialEq for &[u8]>::eq -> bool with true
src/bytes_mut.rs:1680:9: replace <impl PartialOrd for &[u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1686:16: replace == with != in <impl PartialEq for &str>::eq
src/bytes_mut.rs:1686:9: replace <impl PartialEq for &str>::eq -> bool with false
src/bytes_mut.rs:1686:9: replace <impl PartialEq for &str>::eq -> bool with true
src/bytes_mut.rs:1692:9: replace <impl PartialOrd for &str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:664:45: replace - with + in BytesMut::reserve_inner
src/bytes_mut.rs:747:35: replace + with * in BytesMut::reserve_inner
src/bytes_mut.rs:747:35: replace + with - in BytesMut::reserve_inner
src/bytes_mut.rs:778:44: replace << with >> in BytesMut::reserve_inner
src/bytes_mut.rs:778:73: replace | with ^ in BytesMut::reserve_inner
src/bytes_mut.rs:87:17: replace - with +
src/bytes_mut.rs:87:17: replace - with /
src/bytes_mut.rs:931:73: replace | with ^ in BytesMut::from_vec
src/fmt/hex.rs:17:9: replace <impl UpperHex for BytesRef<'_>>::fmt -> Result with Ok(Default::default())
src/fmt/hex.rs:8:9: replace <impl LowerHex for BytesRef<'_>>::fmt -> Result with Ok(Default::default())
src/lib.rs:107:17: replace abort::<impl Drop for Abort>::drop with ()
src/lib.rs:118:5: replace saturating_sub_usize_u64 -> usize with 0
src/lib.rs:118:5: replace saturating_sub_usize_u64 -> usize with 1
src/lib.rs:128:5: replace min_u64_usize -> usize with 0
src/lib.rs:128:5: replace min_u64_usize -> usize with 1

This branch

src/buf/buf_impl.rs:334:29: replace < with == in Buf::get_i8
src/buf/buf_mut.rs:287:33: replace < with == in BufMut::put_bytes
src/buf/buf_mut.rs:287:33: replace < with > in BufMut::put_bytes
src/buf/buf_mut.rs:287:9: replace BufMut::put_bytes with ()
src/buf/buf_mut.rs:291:19: replace > with < in BufMut::put_bytes
src/buf/buf_mut.rs:291:19: replace > with == in BufMut::put_bytes
src/buf/buf_mut.rs:298:17: replace -= with += in BufMut::put_bytes
src/buf/buf_mut.rs:298:17: replace -= with /= in BufMut::put_bytes
src/buf/limit.rs:45:9: replace Limit<T>::limit -> usize with 0
src/buf/limit.rs:45:9: replace Limit<T>::limit -> usize with 1
src/buf/limit.rs:55:9: replace Limit<T>::set_limit with ()
src/buf/uninit_slice.rs:212:9: replace <impl Debug for UninitSlice>::fmt -> fmt::Result with Ok(Default::default())
src/bytes.rs:1012:49: replace | with ^ in <impl From for Bytes>::from
src/bytes.rs:1054:9: replace <impl From for Bytes>::from -> Bytes with Default::default()
src/bytes.rs:1069:9: replace <impl Debug for Vtable>::fmt -> fmt::Result with Ok(Default::default())
src/bytes.rs:1362:9: replace <impl Drop for Shared>::drop with ()
src/bytes.rs:1370:17: replace - with +
src/bytes.rs:1370:17: replace - with /
src/bytes.rs:1603:5: replace ptr_map -> *mut u8 with Default::default()
src/bytes.rs:180:9: replace Bytes::from_static -> Self with Default::default()
src/bytes.rs:319:9: replace Bytes::is_empty -> bool with true
src/bytes.rs:598:49: replace == with != in Bytes::truncate
src/bytes.rs:749:9: replace <impl Hash for Bytes>::hash with ()
src/bytes.rs:755:9: replace <impl Borrow for Bytes>::borrow -> &[u8] with Vec::leak(Vec::new())
src/bytes.rs:773:9: replace <impl IntoIterator for &'a Bytes>::into_iter -> Self::IntoIter with Default::default()
src/bytes.rs:779:9: replace <impl FromIterator for Bytes>::from_iter -> Self with Default::default()
src/bytes.rs:787:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:793:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:807:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:813:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:819:9: replace <impl PartialEq for [u8]>::eq -> bool with true
src/bytes.rs:825:9: replace <impl PartialOrd for [u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:831:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:837:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:843:16: replace == with != in <impl PartialEq for str>::eq
src/bytes.rs:843:9: replace <impl PartialEq for str>::eq -> bool with false
src/bytes.rs:843:9: replace <impl PartialEq for str>::eq -> bool with true
src/bytes.rs:849:9: replace <impl PartialOrd for str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:855:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:861:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:867:9: replace <impl PartialEq for Vec<u8>>::eq -> bool with true
src/bytes.rs:873:9: replace <impl PartialOrd for Vec<u8>>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:879:15: replace == with != in <impl PartialEq for Bytes>::eq
src/bytes.rs:879:9: replace <impl PartialEq for Bytes>::eq -> bool with false
src/bytes.rs:879:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:885:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:891:16: replace == with != in <impl PartialEq for String>::eq
src/bytes.rs:891:9: replace <impl PartialEq for String>::eq -> bool with false
src/bytes.rs:891:9: replace <impl PartialEq for String>::eq -> bool with true
src/bytes.rs:897:9: replace <impl PartialOrd for String>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:903:9: replace <impl PartialEq for &[u8]>::eq -> bool with true
src/bytes.rs:909:9: replace <impl PartialOrd for &[u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:915:16: replace == with != in <impl PartialEq for &str>::eq
src/bytes.rs:915:9: replace <impl PartialEq for &str>::eq -> bool with false
src/bytes.rs:915:9: replace <impl PartialEq for &str>::eq -> bool with true
src/bytes.rs:921:9: replace <impl PartialOrd for &str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes.rs:930:9: replace <impl PartialEq for Bytes>::eq -> bool with true
src/bytes.rs:939:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:110:39: replace >> with <<
src/bytes_mut.rs:1284:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1308:9: replace <impl Hash for BytesMut>::hash with ()
src/bytes_mut.rs:1315:9: replace <impl Borrow for BytesMut>::borrow -> &[u8] with Vec::leak(Vec::new())
src/bytes_mut.rs:1315:9: replace <impl Borrow for BytesMut>::borrow -> &[u8] with Vec::leak(vec![0])
src/bytes_mut.rs:1315:9: replace <impl Borrow for BytesMut>::borrow -> &[u8] with Vec::leak(vec![1])
src/bytes_mut.rs:1321:9: replace <impl BorrowMut for BytesMut>::borrow_mut -> &mut[u8] with Vec::leak(Vec::new())
src/bytes_mut.rs:1321:9: replace <impl BorrowMut for BytesMut>::borrow_mut -> &mut[u8] with Vec::leak(vec![0])
src/bytes_mut.rs:1321:9: replace <impl BorrowMut for BytesMut>::borrow_mut -> &mut[u8] with Vec::leak(vec![1])
src/bytes_mut.rs:1344:9: replace <impl Clone for BytesMut>::clone -> BytesMut with Default::default()
src/bytes_mut.rs:1406:9: replace <impl FromIterator for BytesMut>::from_iter -> Self with Default::default()
src/bytes_mut.rs:1412:9: replace <impl FromIterator for BytesMut>::from_iter -> Self with Default::default()
src/bytes_mut.rs:1560:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1566:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1572:9: replace <impl PartialEq for [u8]>::eq -> bool with true
src/bytes_mut.rs:1578:9: replace <impl PartialOrd for [u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1584:17: replace == with != in <impl PartialEq for BytesMut>::eq
src/bytes_mut.rs:1584:9: replace <impl PartialEq for BytesMut>::eq -> bool with false
src/bytes_mut.rs:1584:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1590:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1596:16: replace == with != in <impl PartialEq for str>::eq
src/bytes_mut.rs:1596:9: replace <impl PartialEq for str>::eq -> bool with false
src/bytes_mut.rs:1596:9: replace <impl PartialEq for str>::eq -> bool with true
src/bytes_mut.rs:1602:9: replace <impl PartialOrd for str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1608:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1614:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1620:9: replace <impl PartialEq for Vec<u8>>::eq -> bool with true
src/bytes_mut.rs:1626:9: replace <impl PartialOrd for Vec<u8>>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1632:15: replace == with != in <impl PartialEq for BytesMut>::eq
src/bytes_mut.rs:1632:9: replace <impl PartialEq for BytesMut>::eq -> bool with false
src/bytes_mut.rs:1632:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1638:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1644:16: replace == with != in <impl PartialEq for String>::eq
src/bytes_mut.rs:1644:9: replace <impl PartialEq for String>::eq -> bool with false
src/bytes_mut.rs:1644:9: replace <impl PartialEq for String>::eq -> bool with true
src/bytes_mut.rs:1650:9: replace <impl PartialOrd for String>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1659:9: replace <impl PartialEq for BytesMut>::eq -> bool with true
src/bytes_mut.rs:1668:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1674:9: replace <impl PartialEq for &[u8]>::eq -> bool with true
src/bytes_mut.rs:1680:9: replace <impl PartialOrd for &[u8]>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:1686:16: replace == with != in <impl PartialEq for &str>::eq
src/bytes_mut.rs:1686:9: replace <impl PartialEq for &str>::eq -> bool with false
src/bytes_mut.rs:1686:9: replace <impl PartialEq for &str>::eq -> bool with true
src/bytes_mut.rs:1692:9: replace <impl PartialOrd for &str>::partial_cmp -> Option<cmp::Ordering> with None
src/bytes_mut.rs:664:45: replace - with + in BytesMut::reserve_inner
src/bytes_mut.rs:747:35: replace + with * in BytesMut::reserve_inner
src/bytes_mut.rs:747:35: replace + with - in BytesMut::reserve_inner
src/bytes_mut.rs:778:44: replace << with >> in BytesMut::reserve_inner
src/bytes_mut.rs:778:73: replace | with ^ in BytesMut::reserve_inner
src/bytes_mut.rs:87:17: replace - with +
src/bytes_mut.rs:87:17: replace - with /
src/bytes_mut.rs:931:73: replace | with ^ in BytesMut::from_vec
src/fmt/hex.rs:17:9: replace <impl UpperHex for BytesRef<'_>>::fmt -> Result with Ok(Default::default())
src/fmt/hex.rs:8:9: replace <impl LowerHex for BytesRef<'_>>::fmt -> Result with Ok(Default::default())
src/lib.rs:107:17: replace abort::<impl Drop for Abort>::drop with ()

diff

diff --git a/missed-master-sorted.txt b/missed-buf-tests-sorted.txt
index 29294e6..0182cea 100644
--- a/missed-master-sorted.txt
+++ b/missed-buf-tests-sorted.txt
@@ -1,11 +1,3 @@
-src/buf/buf_impl.rs:1443:9: replace <impl Buf for std::io::Cursor<T>>::remaining -> usize with 0
-src/buf/buf_impl.rs:1443:9: replace <impl Buf for std::io::Cursor<T>>::remaining -> usize with 1
-src/buf/buf_impl.rs:1455:9: replace <impl Buf for std::io::Cursor<T>>::advance with ()
-src/buf/buf_impl.rs:1460:16: replace > with < in <impl Buf for std::io::Cursor<T>>::advance
-src/buf/buf_impl.rs:1460:16: replace > with == in <impl Buf for std::io::Cursor<T>>::advance
-src/buf/buf_impl.rs:1466:31: replace + with * in <impl Buf for std::io::Cursor<T>>::advance
-src/buf/buf_impl.rs:1466:31: replace + with - in <impl Buf for std::io::Cursor<T>>::advance
-src/buf/buf_impl.rs:277:29: replace < with > in Buf::copy_to_slice
 src/buf/buf_impl.rs:334:29: replace < with == in Buf::get_i8
 src/buf/buf_mut.rs:287:33: replace < with == in BufMut::put_bytes
 src/buf/buf_mut.rs:287:33: replace < with > in BufMut::put_bytes
@@ -14,13 +6,9 @@ src/buf/buf_mut.rs:291:19: replace > with < in BufMut::put_bytes
 src/buf/buf_mut.rs:291:19: replace > with == in BufMut::put_bytes
 src/buf/buf_mut.rs:298:17: replace -= with += in BufMut::put_bytes
 src/buf/buf_mut.rs:298:17: replace -= with /= in BufMut::put_bytes
-src/buf/chain.rs:159:17: replace -= with += in <impl Buf for Chain<T, U>>::advance
-src/buf/chain.rs:159:17: replace -= with /= in <impl Buf for Chain<T, U>>::advance
 src/buf/limit.rs:45:9: replace Limit<T>::limit -> usize with 0
 src/buf/limit.rs:45:9: replace Limit<T>::limit -> usize with 1
 src/buf/limit.rs:55:9: replace Limit<T>::set_limit with ()
-src/buf/take.rs:152:20: replace -= with += in <impl Buf for Take<T>>::copy_to_bytes
-src/buf/take.rs:152:20: replace -= with /= in <impl Buf for Take<T>>::copy_to_bytes
 src/buf/uninit_slice.rs:212:9: replace <impl Debug for UninitSlice>::fmt -> fmt::Result with Ok(Default::default())
 src/bytes.rs:1012:49: replace | with ^ in <impl From for Bytes>::from
 src/bytes.rs:1054:9: replace <impl From for Bytes>::from -> Bytes with Default::default()
@@ -69,7 +57,6 @@ src/bytes.rs:921:9: replace <impl PartialOrd for &str>::partial_cmp -> Option<cm
 src/bytes.rs:930:9: replace <impl PartialEq for Bytes>::eq -> bool with true
 src/bytes.rs:939:9: replace <impl PartialOrd for Bytes>::partial_cmp -> Option<cmp::Ordering> with None
 src/bytes_mut.rs:110:39: replace >> with <<
-src/bytes_mut.rs:1167:9: replace <impl Buf for BytesMut>::copy_to_bytes -> Bytes with Default::default()
 src/bytes_mut.rs:1284:9: replace <impl PartialOrd for BytesMut>::partial_cmp -> Option<cmp::Ordering> with None
 src/bytes_mut.rs:1308:9: replace <impl Hash for BytesMut>::hash with ()
 src/bytes_mut.rs:1315:9: replace <impl Borrow for BytesMut>::borrow -> &[u8] with Vec::leak(Vec::new())
@@ -124,7 +111,3 @@ src/bytes_mut.rs:931:73: replace | with ^ in BytesMut::from_vec
 src/fmt/hex.rs:17:9: replace <impl UpperHex for BytesRef<'_>>::fmt -> Result with Ok(Default::default())
 src/fmt/hex.rs:8:9: replace <impl LowerHex for BytesRef<'_>>::fmt -> Result with Ok(Default::default())
 src/lib.rs:107:17: replace abort::<impl Drop for Abort>::drop with ()
-src/lib.rs:118:5: replace saturating_sub_usize_u64 -> usize with 0
-src/lib.rs:118:5: replace saturating_sub_usize_u64 -> usize with 1
-src/lib.rs:128:5: replace min_u64_usize -> usize with 0
-src/lib.rs:128:5: replace min_u64_usize -> usize with 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant