Skip to content

Inconsistency between code and comment #1624

@YichiZhang0613

Description

@YichiZhang0613

In rand-master/rand_core/src/le.rs, following comment and code are inconsistent.

/// # Panics
///
/// If `dst` has insufficient space (`4*dst.len() < src.len()`).
#[inline]
#[track_caller]
pub fn read_u32_into(src: &[u8], dst: &mut [u32]) {
    assert!(src.len() >= 4 * dst.len());
...
/// # Panics
///
/// If `dst` has insufficient space (`8*dst.len() < src.len()`).
#[inline]
#[track_caller]
pub fn read_u64_into(src: &[u8], dst: &mut [u64]) {
    assert!(src.len() >= 8 * dst.len());
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions