diff options
author | Samanta Navarro <ferivoz@riseup.net> | 2020-11-11 11:38:19 +0000 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-11-12 11:44:09 -0500 |
commit | 4a0cd79588d2a472ab81e4f1d0e1e1bf6f2b390c (patch) | |
tree | 482e652a53ead4b26e8d97a4854671cdc0df0d61 /src/rust | |
parent | e2d3c9c5f82a1369385dd99765c31ba479ba8f23 (diff) | |
download | tor-4a0cd79588d2a472ab81e4f1d0e1e1bf6f2b390c.tar.gz tor-4a0cd79588d2a472ab81e4f1d0e1e1bf6f2b390c.zip |
Fix typos.
Typos found with codespell.
Please keep in mind that this should have impact on actual code
and must be carefully evaluated:
src/core/or/lttng_circuit.inc
- ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER)
+ ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
Diffstat (limited to 'src/rust')
-rw-r--r-- | src/rust/crypto/rand/rng.rs | 4 | ||||
-rw-r--r-- | src/rust/external/crypto_digest.rs | 6 | ||||
-rw-r--r-- | src/rust/tor_allocate/tor_allocate.rs | 2 | ||||
-rw-r--r-- | src/rust/tor_log/tor_log.rs | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/rust/crypto/rand/rng.rs b/src/rust/crypto/rand/rng.rs index 96e112799e..644a5c20b1 100644 --- a/src/rust/crypto/rand/rng.rs +++ b/src/rust/crypto/rand/rng.rs @@ -33,7 +33,7 @@ mod internal { /// A wrapper around OpenSSL's RNG. pub struct TorRng { // This private, zero-length field forces the struct to be treated the - // same as its opaque C couterpart. + // same as its opaque C counterpart. _unused: [u8; 0], } @@ -83,7 +83,7 @@ mod internal { /// obtained from the operating system. pub struct TorStrongestRng { // This private, zero-length field forces the struct to be treated the - // same as its opaque C couterpart. + // same as its opaque C counterpart. _unused: [u8; 0], } diff --git a/src/rust/external/crypto_digest.rs b/src/rust/external/crypto_digest.rs index 454f836bad..873f75e7a3 100644 --- a/src/rust/external/crypto_digest.rs +++ b/src/rust/external/crypto_digest.rs @@ -79,7 +79,7 @@ const N_COMMON_DIGEST_ALGORITHMS: usize = DIGEST_SHA256 as usize + 1; #[allow(non_camel_case_types)] struct crypto_digest_t { // This private, zero-length field forces the struct to be treated the same - // as its opaque C couterpart. + // as its opaque C counterpart. _unused: [u8; 0], } @@ -89,7 +89,7 @@ struct crypto_digest_t { #[allow(non_camel_case_types)] struct crypto_xof_t { // This private, zero-length field forces the struct to be treated the same - // as its opaque C couterpart. + // as its opaque C counterpart. _unused: [u8; 0], } @@ -254,7 +254,7 @@ impl CryptoDigest { /// * `crypto_digest256_new` /// * `crypto_digest512_new` /// * `tor_malloc` (called by `crypto_digest256_new`, but we make - /// assumptions about its behvaiour and return values here) + /// assumptions about its behaviour and return values here) pub fn new(algorithm: Option<DigestAlgorithm>) -> CryptoDigest { let digest: *mut crypto_digest_t; diff --git a/src/rust/tor_allocate/tor_allocate.rs b/src/rust/tor_allocate/tor_allocate.rs index 682a524ee7..7b35e2451f 100644 --- a/src/rust/tor_allocate/tor_allocate.rs +++ b/src/rust/tor_allocate/tor_allocate.rs @@ -60,7 +60,7 @@ pub fn allocate_and_copy_string(src: &str) -> *mut c_char { unsafe { ptr::copy_nonoverlapping(bytes.as_ptr(), dest, size) }; // set the last byte as null, using the ability to index into a slice - // rather than doing pointer arithmatic + // rather than doing pointer arithmetic let slice = unsafe { slice::from_raw_parts_mut(dest, size_with_null_byte) }; slice[size] = 0; // add a null terminator diff --git a/src/rust/tor_log/tor_log.rs b/src/rust/tor_log/tor_log.rs index bbaf97129c..391cb32ab3 100644 --- a/src/rust/tor_log/tor_log.rs +++ b/src/rust/tor_log/tor_log.rs @@ -103,7 +103,7 @@ pub mod log { static LD_GENERAL_: u64; } - /// Translate Rust defintions of log domain levels to C. This exposes a 1:1 + /// Translate Rust definitions of log domain levels to C. This exposes a 1:1 /// mapping between types. #[inline] pub unsafe fn translate_domain(domain: LogDomain) -> u64 { @@ -113,7 +113,7 @@ pub mod log { } } - /// Translate Rust defintions of log severity levels to C. This exposes a + /// Translate Rust definitions of log severity levels to C. This exposes a /// 1:1 mapping between types. #[inline] pub unsafe fn translate_severity(severity: LogSeverity) -> c_int { |