File tree 5 files changed +6
-7
lines changed
5 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ macro_rules! chacha_impl {
182
182
183
183
impl $ChaChaXRng {
184
184
// The buffer is a 4-block window, i.e. it is always at a block-aligned position in the
185
- // stream but if the stream has been seeked it may not be self-aligned.
185
+ // stream but if the stream has been sought it may not be self-aligned.
186
186
187
187
/// Get the offset from the start of the stream, in 32-bit words.
188
188
///
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ impl Error {
82
82
///
83
83
/// This method is identical to `std::io::Error::raw_os_error()`, except
84
84
/// that it works in `no_std` contexts. If this method returns `None`, the
85
- /// error value can still be formatted via the `Diplay ` implementation.
85
+ /// error value can still be formatted via the `Display ` implementation.
86
86
#[ inline]
87
87
pub fn raw_os_error ( & self ) -> Option < i32 > {
88
88
#[ cfg( feature = "std" ) ]
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ pub trait RngCore {
196
196
/// Some generators may satisfy an additional property, however this is not
197
197
/// required by this trait: if the CSPRNG's state is revealed, it should not be
198
198
/// computationally-feasible to reconstruct output prior to this. Some other
199
- /// generators allow backwards-computation and are consided *reversible*.
199
+ /// generators allow backwards-computation and are considered *reversible*.
200
200
///
201
201
/// Note that this trait is provided for guidance only and cannot guarantee
202
202
/// suitability for cryptographic applications. In general it should only be
@@ -215,7 +215,7 @@ pub trait CryptoRng {}
215
215
///
216
216
/// [`rand`]: https://docs.rs/rand
217
217
pub trait SeedableRng : Sized {
218
- /// Seed type, which is restricted to types mutably-dereferencable as `u8`
218
+ /// Seed type, which is restricted to types mutably-dereferenceable as `u8`
219
219
/// arrays (we recommend `[u8; N]` for some `N`).
220
220
///
221
221
/// It is recommended to seed PRNGs with a seed of at least circa 100 bits,
Original file line number Diff line number Diff line change @@ -73,8 +73,7 @@ impl Binomial {
73
73
}
74
74
}
75
75
76
- /// Convert a `f64` to an `i64`, panicing on overflow.
77
- // In the future (Rust 1.34), this might be replaced with `TryFrom`.
76
+ /// Convert a `f64` to an `i64`, panicking on overflow.
78
77
fn f64_to_i64 ( x : f64 ) -> i64 {
79
78
assert ! ( x < ( core:: i64 :: MAX as f64 ) ) ;
80
79
x as i64
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ impl std::error::Error for Error {}
55
55
56
56
impl Geometric {
57
57
/// Construct a new `Geometric` with the given shape parameter `p`
58
- /// (probablity of success on each trial).
58
+ /// (probability of success on each trial).
59
59
pub fn new ( p : f64 ) -> Result < Self , Error > {
60
60
if !p. is_finite ( ) || p < 0.0 || p > 1.0 {
61
61
Err ( Error :: InvalidProbability )
You can’t perform that action at this time.
0 commit comments