@@ -237,7 +237,7 @@ impl ScalarInt {
237
237
}
238
238
239
239
/// Tries to convert the `ScalarInt` to an unsigned integer of the given size.
240
- /// Fails if the size of the `ScalarInt` is unequal to `size` and returns the
240
+ /// Fails if the size of the `ScalarInt` is not equal to `size` and returns the
241
241
/// `ScalarInt`s size in that case.
242
242
#[ inline]
243
243
pub fn try_to_uint ( self , size : Size ) -> Result < u128 , Size > {
@@ -297,7 +297,7 @@ impl ScalarInt {
297
297
}
298
298
299
299
/// Tries to convert the `ScalarInt` to a signed integer of the given size.
300
- /// Fails if the size of the `ScalarInt` is unequal to `size` and returns the
300
+ /// Fails if the size of the `ScalarInt` is not equal to `size` and returns the
301
301
/// `ScalarInt`s size in that case.
302
302
#[ inline]
303
303
pub fn try_to_int ( self , size : Size ) -> Result < i128 , Size > {
@@ -306,35 +306,35 @@ impl ScalarInt {
306
306
}
307
307
308
308
/// Tries to convert the `ScalarInt` to i8.
309
- /// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 1 }`
309
+ /// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 1 }`
310
310
/// and returns the `ScalarInt`s size in that case.
311
311
pub fn try_to_i8 ( self ) -> Result < i8 , Size > {
312
312
self . try_to_int ( Size :: from_bits ( 8 ) ) . map ( |v| i8:: try_from ( v) . unwrap ( ) )
313
313
}
314
314
315
315
/// Tries to convert the `ScalarInt` to i16.
316
- /// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 2 }`
316
+ /// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 2 }`
317
317
/// and returns the `ScalarInt`s size in that case.
318
318
pub fn try_to_i16 ( self ) -> Result < i16 , Size > {
319
319
self . try_to_int ( Size :: from_bits ( 16 ) ) . map ( |v| i16:: try_from ( v) . unwrap ( ) )
320
320
}
321
321
322
322
/// Tries to convert the `ScalarInt` to i32.
323
- /// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 4 }`
323
+ /// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 4 }`
324
324
/// and returns the `ScalarInt`s size in that case.
325
325
pub fn try_to_i32 ( self ) -> Result < i32 , Size > {
326
326
self . try_to_int ( Size :: from_bits ( 32 ) ) . map ( |v| i32:: try_from ( v) . unwrap ( ) )
327
327
}
328
328
329
329
/// Tries to convert the `ScalarInt` to i64.
330
- /// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 8 }`
330
+ /// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 8 }`
331
331
/// and returns the `ScalarInt`s size in that case.
332
332
pub fn try_to_i64 ( self ) -> Result < i64 , Size > {
333
333
self . try_to_int ( Size :: from_bits ( 64 ) ) . map ( |v| i64:: try_from ( v) . unwrap ( ) )
334
334
}
335
335
336
336
/// Tries to convert the `ScalarInt` to i128.
337
- /// Fails if the size of the `ScalarInt` is unequal to `Size { raw: 16 }`
337
+ /// Fails if the size of the `ScalarInt` is not equal to `Size { raw: 16 }`
338
338
/// and returns the `ScalarInt`s size in that case.
339
339
pub fn try_to_i128 ( self ) -> Result < i128 , Size > {
340
340
self . try_to_int ( Size :: from_bits ( 128 ) ) . map ( |v| i128:: try_from ( v) . unwrap ( ) )
0 commit comments