mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 10:18:11 +00:00
shuf: remove ReadRng deprecation notices
This commit is contained in:
parent
6bcca01e83
commit
2630894658
1 changed files with 0 additions and 6 deletions
|
@ -9,14 +9,11 @@
|
||||||
|
|
||||||
//! A wrapper around any Read to treat it as an RNG.
|
//! A wrapper around any Read to treat it as an RNG.
|
||||||
|
|
||||||
#![allow(deprecated)]
|
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
|
|
||||||
use rand_core::{impls, Error, RngCore};
|
use rand_core::{impls, Error, RngCore};
|
||||||
|
|
||||||
|
|
||||||
/// An RNG that reads random bytes straight from any type supporting
|
/// An RNG that reads random bytes straight from any type supporting
|
||||||
/// [`std::io::Read`], for example files.
|
/// [`std::io::Read`], for example files.
|
||||||
///
|
///
|
||||||
|
@ -35,7 +32,6 @@ use rand_core::{impls, Error, RngCore};
|
||||||
/// [`OsRng`]: crate::rngs::OsRng
|
/// [`OsRng`]: crate::rngs::OsRng
|
||||||
/// [`try_fill_bytes`]: RngCore::try_fill_bytes
|
/// [`try_fill_bytes`]: RngCore::try_fill_bytes
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[deprecated(since="0.8.4", note="removal due to lack of usage")]
|
|
||||||
pub struct ReadRng<R> {
|
pub struct ReadRng<R> {
|
||||||
reader: R,
|
reader: R,
|
||||||
}
|
}
|
||||||
|
@ -78,7 +74,6 @@ impl<R: Read> RngCore for ReadRng<R> {
|
||||||
|
|
||||||
/// `ReadRng` error type
|
/// `ReadRng` error type
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[deprecated(since="0.8.4")]
|
|
||||||
pub struct ReadError(std::io::Error);
|
pub struct ReadError(std::io::Error);
|
||||||
|
|
||||||
impl fmt::Display for ReadError {
|
impl fmt::Display for ReadError {
|
||||||
|
@ -93,7 +88,6 @@ impl std::error::Error for ReadError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use std::println;
|
use std::println;
|
||||||
|
|
Loading…
Reference in a new issue