mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-25 08:39:15 -05:00
Fix misleading BigInt rustdoc (#1379)
* Fix misleading BigInt rustdoc The original documentation was unclear about the value of the bool. I interpreted it as being `true` if the value was truncated.
This commit is contained in:
parent
54e93385b8
commit
477f5af361
1 changed files with 5 additions and 4 deletions
|
@ -79,9 +79,9 @@ impl BigInt {
|
|||
}
|
||||
|
||||
/// Returns the value of this BigInt as an unsigned 64-bit integer, and a
|
||||
/// `bool` indicating whether the return value was truncated was truncated or
|
||||
/// wrapped around. In particular, it will be `false` if this BigInt is
|
||||
/// negative.
|
||||
/// `bool` indicating that the conversion was lossless when `true`.
|
||||
/// The boolean value will be `false` if the return value was truncated or wrapped around,
|
||||
/// in particular if the BigInt is negative.
|
||||
#[inline(always)]
|
||||
pub fn u64_value(&self) -> (u64, bool) {
|
||||
let mut lossless = MaybeUninit::uninit();
|
||||
|
@ -91,7 +91,8 @@ impl BigInt {
|
|||
}
|
||||
|
||||
/// Returns the value of this BigInt as a signed 64-bit integer, and a `bool`
|
||||
/// indicating whether this BigInt was truncated or not.
|
||||
/// indicating that the conversion was lossless when `true`.
|
||||
/// The boolean value will be `false` if the return value was truncated or wrapped around.
|
||||
#[inline(always)]
|
||||
pub fn i64_value(&self) -> (i64, bool) {
|
||||
let mut lossless = MaybeUninit::uninit();
|
||||
|
|
Loading…
Reference in a new issue