Skip to content

Commit

Permalink
Merge pull request #1164 from vks/spelling
Browse files Browse the repository at this point in the history
Fix spelling
  • Loading branch information
vks committed Aug 25, 2021
2 parents 97ba8f8 + 36c1638 commit ee1aacd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rand_chacha/src/chacha.rs
Expand Up @@ -182,7 +182,7 @@ macro_rules! chacha_impl {

impl $ChaChaXRng {
// The buffer is a 4-block window, i.e. it is always at a block-aligned position in the
// stream but if the stream has been seeked it may not be self-aligned.
// stream but if the stream has been sought it may not be self-aligned.

/// Get the offset from the start of the stream, in 32-bit words.
///
Expand Down
2 changes: 1 addition & 1 deletion rand_core/src/error.rs
Expand Up @@ -82,7 +82,7 @@ impl Error {
///
/// This method is identical to `std::io::Error::raw_os_error()`, except
/// that it works in `no_std` contexts. If this method returns `None`, the
/// error value can still be formatted via the `Diplay` implementation.
/// error value can still be formatted via the `Display` implementation.
#[inline]
pub fn raw_os_error(&self) -> Option<i32> {
#[cfg(feature = "std")]
Expand Down
4 changes: 2 additions & 2 deletions rand_core/src/lib.rs
Expand Up @@ -196,7 +196,7 @@ pub trait RngCore {
/// Some generators may satisfy an additional property, however this is not
/// required by this trait: if the CSPRNG's state is revealed, it should not be
/// computationally-feasible to reconstruct output prior to this. Some other
/// generators allow backwards-computation and are consided *reversible*.
/// generators allow backwards-computation and are considered *reversible*.
///
/// Note that this trait is provided for guidance only and cannot guarantee
/// suitability for cryptographic applications. In general it should only be
Expand All @@ -215,7 +215,7 @@ pub trait CryptoRng {}
///
/// [`rand`]: https://docs.rs/rand
pub trait SeedableRng: Sized {
/// Seed type, which is restricted to types mutably-dereferencable as `u8`
/// Seed type, which is restricted to types mutably-dereferenceable as `u8`
/// arrays (we recommend `[u8; N]` for some `N`).
///
/// It is recommended to seed PRNGs with a seed of at least circa 100 bits,
Expand Down
3 changes: 1 addition & 2 deletions rand_distr/src/binomial.rs
Expand Up @@ -73,8 +73,7 @@ impl Binomial {
}
}

/// Convert a `f64` to an `i64`, panicing on overflow.
// In the future (Rust 1.34), this might be replaced with `TryFrom`.
/// Convert a `f64` to an `i64`, panicking on overflow.
fn f64_to_i64(x: f64) -> i64 {
assert!(x < (core::i64::MAX as f64));
x as i64
Expand Down
2 changes: 1 addition & 1 deletion rand_distr/src/geometric.rs
Expand Up @@ -55,7 +55,7 @@ impl std::error::Error for Error {}

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

0 comments on commit ee1aacd

Please sign in to comment.