Skip to content

Commit 8490cdd

Browse files
committed
Patch cargo deps
1 parent 5f2e9e9 commit 8490cdd

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

bytes-1.5.0/src/buf/buf_impl.rs

+30-30
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ macro_rules! buf_get_impl {
2323
if let Some(ret) = ret {
2424
// if the direct conversion was possible, advance and return
2525
$this.advance(SIZE);
26-
return ret;
26+
ret
2727
} else {
2828
// if not we copy the bytes in a temp buffer then convert
2929
let mut buf = [0; SIZE];
3030
$this.copy_to_slice(&mut buf); // (do the advance)
31-
return $typ::$conv(buf);
31+
$typ::$conv(buf)
3232
}
3333
}};
3434
(le => $this:ident, $typ:tt, $len_to_read:expr) => {{
@@ -332,7 +332,7 @@ pub trait Buf {
332332
///
333333
/// This function panics if there is not enough remaining data in `self`.
334334
fn get_u16(&mut self) -> u16 {
335-
buf_get_impl!(self, u16::from_be_bytes);
335+
buf_get_impl!(self, u16::from_be_bytes)
336336
}
337337

338338
/// Gets an unsigned 16 bit integer from `self` in little-endian byte order.
@@ -352,7 +352,7 @@ pub trait Buf {
352352
///
353353
/// This function panics if there is not enough remaining data in `self`.
354354
fn get_u16_le(&mut self) -> u16 {
355-
buf_get_impl!(self, u16::from_le_bytes);
355+
buf_get_impl!(self, u16::from_le_bytes)
356356
}
357357

358358
/// Gets an unsigned 16 bit integer from `self` in native-endian byte order.
@@ -375,7 +375,7 @@ pub trait Buf {
375375
///
376376
/// This function panics if there is not enough remaining data in `self`.
377377
fn get_u16_ne(&mut self) -> u16 {
378-
buf_get_impl!(self, u16::from_ne_bytes);
378+
buf_get_impl!(self, u16::from_ne_bytes)
379379
}
380380

381381
/// Gets a signed 16 bit integer from `self` in big-endian byte order.
@@ -395,7 +395,7 @@ pub trait Buf {
395395
///
396396
/// This function panics if there is not enough remaining data in `self`.
397397
fn get_i16(&mut self) -> i16 {
398-
buf_get_impl!(self, i16::from_be_bytes);
398+
buf_get_impl!(self, i16::from_be_bytes)
399399
}
400400

401401
/// Gets a signed 16 bit integer from `self` in little-endian byte order.
@@ -415,7 +415,7 @@ pub trait Buf {
415415
///
416416
/// This function panics if there is not enough remaining data in `self`.
417417
fn get_i16_le(&mut self) -> i16 {
418-
buf_get_impl!(self, i16::from_le_bytes);
418+
buf_get_impl!(self, i16::from_le_bytes)
419419
}
420420

421421
/// Gets a signed 16 bit integer from `self` in native-endian byte order.
@@ -438,7 +438,7 @@ pub trait Buf {
438438
///
439439
/// This function panics if there is not enough remaining data in `self`.
440440
fn get_i16_ne(&mut self) -> i16 {
441-
buf_get_impl!(self, i16::from_ne_bytes);
441+
buf_get_impl!(self, i16::from_ne_bytes)
442442
}
443443

444444
/// Gets an unsigned 32 bit integer from `self` in the big-endian byte order.
@@ -458,7 +458,7 @@ pub trait Buf {
458458
///
459459
/// This function panics if there is not enough remaining data in `self`.
460460
fn get_u32(&mut self) -> u32 {
461-
buf_get_impl!(self, u32::from_be_bytes);
461+
buf_get_impl!(self, u32::from_be_bytes)
462462
}
463463

464464
/// Gets an unsigned 32 bit integer from `self` in the little-endian byte order.
@@ -478,7 +478,7 @@ pub trait Buf {
478478
///
479479
/// This function panics if there is not enough remaining data in `self`.
480480
fn get_u32_le(&mut self) -> u32 {
481-
buf_get_impl!(self, u32::from_le_bytes);
481+
buf_get_impl!(self, u32::from_le_bytes)
482482
}
483483

484484
/// Gets an unsigned 32 bit integer from `self` in native-endian byte order.
@@ -501,7 +501,7 @@ pub trait Buf {
501501
///
502502
/// This function panics if there is not enough remaining data in `self`.
503503
fn get_u32_ne(&mut self) -> u32 {
504-
buf_get_impl!(self, u32::from_ne_bytes);
504+
buf_get_impl!(self, u32::from_ne_bytes)
505505
}
506506

507507
/// Gets a signed 32 bit integer from `self` in big-endian byte order.
@@ -521,7 +521,7 @@ pub trait Buf {
521521
///
522522
/// This function panics if there is not enough remaining data in `self`.
523523
fn get_i32(&mut self) -> i32 {
524-
buf_get_impl!(self, i32::from_be_bytes);
524+
buf_get_impl!(self, i32::from_be_bytes)
525525
}
526526

527527
/// Gets a signed 32 bit integer from `self` in little-endian byte order.
@@ -541,7 +541,7 @@ pub trait Buf {
541541
///
542542
/// This function panics if there is not enough remaining data in `self`.
543543
fn get_i32_le(&mut self) -> i32 {
544-
buf_get_impl!(self, i32::from_le_bytes);
544+
buf_get_impl!(self, i32::from_le_bytes)
545545
}
546546

547547
/// Gets a signed 32 bit integer from `self` in native-endian byte order.
@@ -564,7 +564,7 @@ pub trait Buf {
564564
///
565565
/// This function panics if there is not enough remaining data in `self`.
566566
fn get_i32_ne(&mut self) -> i32 {
567-
buf_get_impl!(self, i32::from_ne_bytes);
567+
buf_get_impl!(self, i32::from_ne_bytes)
568568
}
569569

570570
/// Gets an unsigned 64 bit integer from `self` in big-endian byte order.
@@ -584,7 +584,7 @@ pub trait Buf {
584584
///
585585
/// This function panics if there is not enough remaining data in `self`.
586586
fn get_u64(&mut self) -> u64 {
587-
buf_get_impl!(self, u64::from_be_bytes);
587+
buf_get_impl!(self, u64::from_be_bytes)
588588
}
589589

590590
/// Gets an unsigned 64 bit integer from `self` in little-endian byte order.
@@ -604,7 +604,7 @@ pub trait Buf {
604604
///
605605
/// This function panics if there is not enough remaining data in `self`.
606606
fn get_u64_le(&mut self) -> u64 {
607-
buf_get_impl!(self, u64::from_le_bytes);
607+
buf_get_impl!(self, u64::from_le_bytes)
608608
}
609609

610610
/// Gets an unsigned 64 bit integer from `self` in native-endian byte order.
@@ -627,7 +627,7 @@ pub trait Buf {
627627
///
628628
/// This function panics if there is not enough remaining data in `self`.
629629
fn get_u64_ne(&mut self) -> u64 {
630-
buf_get_impl!(self, u64::from_ne_bytes);
630+
buf_get_impl!(self, u64::from_ne_bytes)
631631
}
632632

633633
/// Gets a signed 64 bit integer from `self` in big-endian byte order.
@@ -647,7 +647,7 @@ pub trait Buf {
647647
///
648648
/// This function panics if there is not enough remaining data in `self`.
649649
fn get_i64(&mut self) -> i64 {
650-
buf_get_impl!(self, i64::from_be_bytes);
650+
buf_get_impl!(self, i64::from_be_bytes)
651651
}
652652

653653
/// Gets a signed 64 bit integer from `self` in little-endian byte order.
@@ -667,7 +667,7 @@ pub trait Buf {
667667
///
668668
/// This function panics if there is not enough remaining data in `self`.
669669
fn get_i64_le(&mut self) -> i64 {
670-
buf_get_impl!(self, i64::from_le_bytes);
670+
buf_get_impl!(self, i64::from_le_bytes)
671671
}
672672

673673
/// Gets a signed 64 bit integer from `self` in native-endian byte order.
@@ -690,7 +690,7 @@ pub trait Buf {
690690
///
691691
/// This function panics if there is not enough remaining data in `self`.
692692
fn get_i64_ne(&mut self) -> i64 {
693-
buf_get_impl!(self, i64::from_ne_bytes);
693+
buf_get_impl!(self, i64::from_ne_bytes)
694694
}
695695

696696
/// Gets an unsigned 128 bit integer from `self` in big-endian byte order.
@@ -710,7 +710,7 @@ pub trait Buf {
710710
///
711711
/// This function panics if there is not enough remaining data in `self`.
712712
fn get_u128(&mut self) -> u128 {
713-
buf_get_impl!(self, u128::from_be_bytes);
713+
buf_get_impl!(self, u128::from_be_bytes)
714714
}
715715

716716
/// Gets an unsigned 128 bit integer from `self` in little-endian byte order.
@@ -730,7 +730,7 @@ pub trait Buf {
730730
///
731731
/// This function panics if there is not enough remaining data in `self`.
732732
fn get_u128_le(&mut self) -> u128 {
733-
buf_get_impl!(self, u128::from_le_bytes);
733+
buf_get_impl!(self, u128::from_le_bytes)
734734
}
735735

736736
/// Gets an unsigned 128 bit integer from `self` in native-endian byte order.
@@ -753,7 +753,7 @@ pub trait Buf {
753753
///
754754
/// This function panics if there is not enough remaining data in `self`.
755755
fn get_u128_ne(&mut self) -> u128 {
756-
buf_get_impl!(self, u128::from_ne_bytes);
756+
buf_get_impl!(self, u128::from_ne_bytes)
757757
}
758758

759759
/// Gets a signed 128 bit integer from `self` in big-endian byte order.
@@ -773,7 +773,7 @@ pub trait Buf {
773773
///
774774
/// This function panics if there is not enough remaining data in `self`.
775775
fn get_i128(&mut self) -> i128 {
776-
buf_get_impl!(self, i128::from_be_bytes);
776+
buf_get_impl!(self, i128::from_be_bytes)
777777
}
778778

779779
/// Gets a signed 128 bit integer from `self` in little-endian byte order.
@@ -793,7 +793,7 @@ pub trait Buf {
793793
///
794794
/// This function panics if there is not enough remaining data in `self`.
795795
fn get_i128_le(&mut self) -> i128 {
796-
buf_get_impl!(self, i128::from_le_bytes);
796+
buf_get_impl!(self, i128::from_le_bytes)
797797
}
798798

799799
/// Gets a signed 128 bit integer from `self` in native-endian byte order.
@@ -816,7 +816,7 @@ pub trait Buf {
816816
///
817817
/// This function panics if there is not enough remaining data in `self`.
818818
fn get_i128_ne(&mut self) -> i128 {
819-
buf_get_impl!(self, i128::from_ne_bytes);
819+
buf_get_impl!(self, i128::from_ne_bytes)
820820
}
821821

822822
/// Gets an unsigned n-byte integer from `self` in big-endian byte order.
@@ -836,7 +836,7 @@ pub trait Buf {
836836
///
837837
/// This function panics if there is not enough remaining data in `self`.
838838
fn get_uint(&mut self, nbytes: usize) -> u64 {
839-
buf_get_impl!(be => self, u64, nbytes);
839+
buf_get_impl!(be => self, u64, nbytes)
840840
}
841841

842842
/// Gets an unsigned n-byte integer from `self` in little-endian byte order.
@@ -856,7 +856,7 @@ pub trait Buf {
856856
///
857857
/// This function panics if there is not enough remaining data in `self`.
858858
fn get_uint_le(&mut self, nbytes: usize) -> u64 {
859-
buf_get_impl!(le => self, u64, nbytes);
859+
buf_get_impl!(le => self, u64, nbytes)
860860
}
861861

862862
/// Gets an unsigned n-byte integer from `self` in native-endian byte order.
@@ -903,7 +903,7 @@ pub trait Buf {
903903
///
904904
/// This function panics if there is not enough remaining data in `self`.
905905
fn get_int(&mut self, nbytes: usize) -> i64 {
906-
buf_get_impl!(be => self, i64, nbytes);
906+
buf_get_impl!(be => self, i64, nbytes)
907907
}
908908

909909
/// Gets a signed n-byte integer from `self` in little-endian byte order.
@@ -923,7 +923,7 @@ pub trait Buf {
923923
///
924924
/// This function panics if there is not enough remaining data in `self`.
925925
fn get_int_le(&mut self, nbytes: usize) -> i64 {
926-
buf_get_impl!(le => self, i64, nbytes);
926+
buf_get_impl!(le => self, i64, nbytes)
927927
}
928928

929929
/// Gets a signed n-byte integer from `self` in native-endian byte order.

ct-codecs-1.1.1/src/hex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Decoder for Hex {
4949
match ignore {
5050
Some(ignore) if ignore.contains(&c) => continue,
5151
_ => return Err(Error::InvalidInput),
52-
};
52+
}
5353
}
5454
let c_val = (c_num0 & c_num) | (c_alpha0 & c_alpha);
5555
if bin_pos >= bin_maxlen {

der-0.7.8/src/writer/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'a> SliceWriter<'a> {
3131
/// Encode a value which impls the [`Encode`] trait.
3232
pub fn encode<T: Encode>(&mut self, encodable: &T) -> Result<()> {
3333
if self.is_failed() {
34-
self.error(ErrorKind::Failed)?;
34+
self.error(ErrorKind::Failed)?
3535
}
3636

3737
encodable.encode(self).map_err(|e| {

0 commit comments

Comments
 (0)