Pārlūkot izejas kodu

bigint: inline bits() methods

Josh Stone 8 gadi atpakaļ
vecāks
revīzija
5c3d759d6c
2 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 1 0
      bigint/src/bigint.rs
  2. 1 0
      bigint/src/biguint.rs

+ 1 - 0
bigint/src/bigint.rs

@@ -1068,6 +1068,7 @@ impl BigInt {
 
 
     /// Determines the fewest bits necessary to express the `BigInt`,
     /// Determines the fewest bits necessary to express the `BigInt`,
     /// not including the sign.
     /// not including the sign.
+    #[inline]
     pub fn bits(&self) -> usize {
     pub fn bits(&self) -> usize {
         self.data.bits()
         self.data.bits()
     }
     }

+ 1 - 0
bigint/src/biguint.rs

@@ -1049,6 +1049,7 @@ impl BigUint {
     }
     }
 
 
     /// Determines the fewest bits necessary to express the `BigUint`.
     /// Determines the fewest bits necessary to express the `BigUint`.
+    #[inline]
     pub fn bits(&self) -> usize {
     pub fn bits(&self) -> usize {
         if self.is_zero() {
         if self.is_zero() {
             return 0;
             return 0;