aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Brad Dunbar <dunbarb2@gmail.com> 2023-12-28 00:20:13 -0500
committerGravatar GitHub <noreply@github.com> 2023-12-28 14:20:13 +0900
commitdbbdb63d7691066922ac4c7753e6dd95c07f8fbf (patch)
tree7553615babb0558c3740e0a6888de0616801e3f6 /src
parentf73c6c8e8543ee15741c788d105e2b4235f1bc7b (diff)
downloadbytes-dbbdb63d7691066922ac4c7753e6dd95c07f8fbf.tar.gz
bytes-dbbdb63d7691066922ac4c7753e6dd95c07f8fbf.tar.zst
bytes-dbbdb63d7691066922ac4c7753e6dd95c07f8fbf.zip
Use `self.` instead of `Self::` (#642)
I was a little confused about these calls using `Self::` instead of `self.` here. Is there a reason to use the former instead of the latter?
Diffstat (limited to 'src')
-rw-r--r--src/buf/buf_impl.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buf/buf_impl.rs b/src/buf/buf_impl.rs
index b4ebf40..9367eb2 100644
--- a/src/buf/buf_impl.rs
+++ b/src/buf/buf_impl.rs
@@ -991,7 +991,7 @@ pub trait Buf {
///
/// This function panics if there is not enough remaining data in `self`.
fn get_f32(&mut self) -> f32 {
- f32::from_bits(Self::get_u32(self))
+ f32::from_bits(self.get_u32())
}
/// Gets an IEEE754 single-precision (4 bytes) floating point number from
@@ -1012,7 +1012,7 @@ pub trait Buf {
///
/// This function panics if there is not enough remaining data in `self`.
fn get_f32_le(&mut self) -> f32 {
- f32::from_bits(Self::get_u32_le(self))
+ f32::from_bits(self.get_u32_le())
}
/// Gets an IEEE754 single-precision (4 bytes) floating point number from
@@ -1036,7 +1036,7 @@ pub trait Buf {
///
/// This function panics if there is not enough remaining data in `self`.
fn get_f32_ne(&mut self) -> f32 {
- f32::from_bits(Self::get_u32_ne(self))
+ f32::from_bits(self.get_u32_ne())
}
/// Gets an IEEE754 double-precision (8 bytes) floating point number from
@@ -1057,7 +1057,7 @@ pub trait Buf {
///
/// This function panics if there is not enough remaining data in `self`.
fn get_f64(&mut self) -> f64 {
- f64::from_bits(Self::get_u64(self))
+ f64::from_bits(self.get_u64())
}
/// Gets an IEEE754 double-precision (8 bytes) floating point number from
@@ -1078,7 +1078,7 @@ pub trait Buf {
///
/// This function panics if there is not enough remaining data in `self`.
fn get_f64_le(&mut self) -> f64 {
- f64::from_bits(Self::get_u64_le(self))
+ f64::from_bits(self.get_u64_le())
}
/// Gets an IEEE754 double-precision (8 bytes) floating point number from
@@ -1102,7 +1102,7 @@ pub trait Buf {
///
/// This function panics if there is not enough remaining data in `self`.
fn get_f64_ne(&mut self) -> f64 {
- f64::from_bits(Self::get_u64_ne(self))
+ f64::from_bits(self.get_u64_ne())
}
/// Consumes `len` bytes inside self and returns new instance of `Bytes`