Skip to content

Commit d468501

Browse files
authored
Fix documentation of fns rand_core::le::read_u*_into (#1626)
1 parent 5f5b580 commit d468501

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

rand_core/src/.le.rs.kate-swp

218 Bytes
Binary file not shown.

rand_core/src/le.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111
//! Little-Endian order has been chosen for internal usage; this makes some
1212
//! useful functions available.
1313
14-
/// Reads unsigned 32 bit integers from `src` into `dst`.
14+
/// Fills `dst: &mut [u32]` from `src`
15+
///
16+
/// Reads use Little-Endian byte order, allowing portable reproduction of `dst`
17+
/// from a byte slice.
1518
///
1619
/// # Panics
1720
///
18-
/// If `dst` has insufficient space (`4*dst.len() < src.len()`).
21+
/// If `src` has insufficient length (if `src.len() < 4*dst.len()`).
1922
#[inline]
2023
#[track_caller]
2124
pub fn read_u32_into(src: &[u8], dst: &mut [u32]) {
@@ -25,11 +28,11 @@ pub fn read_u32_into(src: &[u8], dst: &mut [u32]) {
2528
}
2629
}
2730

28-
/// Reads unsigned 64 bit integers from `src` into `dst`.
31+
/// Fills `dst: &mut [u64]` from `src`
2932
///
3033
/// # Panics
3134
///
32-
/// If `dst` has insufficient space (`8*dst.len() < src.len()`).
35+
/// If `src` has insufficient length (if `src.len() < 8*dst.len()`).
3336
#[inline]
3437
#[track_caller]
3538
pub fn read_u64_into(src: &[u8], dst: &mut [u64]) {

0 commit comments

Comments
 (0)