Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misleading BigInt rustdoc #1379

Merged
merged 3 commits into from
Feb 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Loading