Skip to content

Commit ee1aacd

Browse files
authored
Merge pull request #1164 from vks/spelling
Fix spelling
2 parents 97ba8f8 + 36c1638 commit ee1aacd

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

rand_chacha/src/chacha.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ macro_rules! chacha_impl {
182182

183183
impl $ChaChaXRng {
184184
// 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.
186186

187187
/// Get the offset from the start of the stream, in 32-bit words.
188188
///

rand_core/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl Error {
8282
///
8383
/// This method is identical to `std::io::Error::raw_os_error()`, except
8484
/// 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.
8686
#[inline]
8787
pub fn raw_os_error(&self) -> Option<i32> {
8888
#[cfg(feature = "std")]

rand_core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ pub trait RngCore {
196196
/// Some generators may satisfy an additional property, however this is not
197197
/// required by this trait: if the CSPRNG's state is revealed, it should not be
198198
/// 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*.
200200
///
201201
/// Note that this trait is provided for guidance only and cannot guarantee
202202
/// suitability for cryptographic applications. In general it should only be
@@ -215,7 +215,7 @@ pub trait CryptoRng {}
215215
///
216216
/// [`rand`]: https://docs.rs/rand
217217
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`
219219
/// arrays (we recommend `[u8; N]` for some `N`).
220220
///
221221
/// It is recommended to seed PRNGs with a seed of at least circa 100 bits,

rand_distr/src/binomial.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ impl Binomial {
7373
}
7474
}
7575

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.
7877
fn f64_to_i64(x: f64) -> i64 {
7978
assert!(x < (core::i64::MAX as f64));
8079
x as i64

rand_distr/src/geometric.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl std::error::Error for Error {}
5555

5656
impl Geometric {
5757
/// Construct a new `Geometric` with the given shape parameter `p`
58-
/// (probablity of success on each trial).
58+
/// (probability of success on each trial).
5959
pub fn new(p: f64) -> Result<Self, Error> {
6060
if !p.is_finite() || p < 0.0 || p > 1.0 {
6161
Err(Error::InvalidProbability)

0 commit comments

Comments
 (0)