Skip to content

Fix documentation of fns rand_core::le::read_u*_into #1626

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
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
Binary file added rand_core/src/.le.rs.kate-swp
Binary file not shown.
11 changes: 7 additions & 4 deletions rand_core/src/le.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
//! Little-Endian order has been chosen for internal usage; this makes some
//! useful functions available.

/// Reads unsigned 32 bit integers from `src` into `dst`.
/// Fills `dst: &mut [u32]` from `src`
///
/// Reads use Little-Endian byte order, allowing portable reproduction of `dst`
/// from a byte slice.
///
/// # Panics
///
/// If `dst` has insufficient space (`4*dst.len() < src.len()`).
/// If `src` has insufficient length (if `src.len() < 4*dst.len()`).
#[inline]
#[track_caller]
pub fn read_u32_into(src: &[u8], dst: &mut [u32]) {
Expand All @@ -25,11 +28,11 @@ pub fn read_u32_into(src: &[u8], dst: &mut [u32]) {
}
}

/// Reads unsigned 64 bit integers from `src` into `dst`.
/// Fills `dst: &mut [u64]` from `src`
///
/// # Panics
///
/// If `dst` has insufficient space (`8*dst.len() < src.len()`).
/// If `src` has insufficient length (if `src.len() < 8*dst.len()`).
#[inline]
#[track_caller]
pub fn read_u64_into(src: &[u8], dst: &mut [u64]) {
Expand Down