From b2e976da21c18c8f31132e93a7f803b5e32f2b6d Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 14 Dec 2021 11:52:16 -0500 Subject: [PATCH] Spellchecking comments, rm trailing spaces (#284) * Spellchecking comments, rm trailing spaces * revert vendor file changes --- README.md | 2 +- examples/deflateencoder-read.rs | 2 +- src/deflate/write.rs | 2 +- src/ffi/c.rs | 2 +- src/gz/bufread.rs | 4 ++-- src/mem.rs | 4 ++-- src/zlib/write.rs | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3c6ed7639..5525e0017 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ README](https://github.com/rust-lang/libz-sys/blob/main/README.md) for details. For compatibility with previous versions of `flate2`, the cloudflare optimized version of zlib is available, via the `cloudflare_zlib` feature. It's not as -fast as zlib-ng, but it's faster than stock zlib. It requires a x86-64 CPU with +fast as zlib-ng, but it's faster than stock zlib. It requires an x86-64 CPU with SSE 4.2 or ARM64 with NEON & CRC. It does not support 32-bit CPUs at all and is incompatible with mingw. For more information check the [crate documentation](https://crates.io/crates/cloudflare-zlib-sys). Note that diff --git a/examples/deflateencoder-read.rs b/examples/deflateencoder-read.rs index 47e478453..ffb628e48 100644 --- a/examples/deflateencoder-read.rs +++ b/examples/deflateencoder-read.rs @@ -10,7 +10,7 @@ fn main() { println!("{:?}", deflateencoder_read_hello_world().unwrap()); } -// Return a vector containing the Defalte compressed version of hello world +// Return a vector containing the Deflate compressed version of hello world fn deflateencoder_read_hello_world() -> io::Result> { let mut result = Vec::new(); let c = b"hello world"; diff --git a/src/deflate/write.rs b/src/deflate/write.rs index a9aadb98f..3931f525f 100644 --- a/src/deflate/write.rs +++ b/src/deflate/write.rs @@ -139,7 +139,7 @@ impl DeflateEncoder { Ok(self.inner.take_inner()) } - /// Returns the number of bytes that have been written to this compresor. + /// Returns the number of bytes that have been written to this compressor. /// /// Note that not all bytes written to this object may be accounted for, /// there may still be some active buffering. diff --git a/src/ffi/c.rs b/src/ffi/c.rs index 1ab6cab99..b9d170380 100644 --- a/src/ffi/c.rs +++ b/src/ffi/c.rs @@ -109,7 +109,7 @@ extern "C" fn zalloc(_ptr: *mut c_void, items: AllocSize, item_size: AllocSize) extern "C" fn zfree(_ptr: *mut c_void, address: *mut c_void) { unsafe { - // Move our address being free'd back one pointer, read the size we + // Move our address being freed back one pointer, read the size we // stored in `zalloc`, and then free it using the standard Rust // allocator. let ptr = (address as *mut usize).offset(-1); diff --git a/src/gz/bufread.rs b/src/gz/bufread.rs index 88032b8ff..6fac718ab 100644 --- a/src/gz/bufread.rs +++ b/src/gz/bufread.rs @@ -861,7 +861,7 @@ pub mod tests { } r.set_position(pos2); - // Fourth read : now succesful for 7 bytes + // Fourth read : now successful for 7 bytes let mut reader3 = Buffer::new(&mut part, &mut r); match reader3.read_and_forget(&mut out) { Ok(7) => { @@ -873,7 +873,7 @@ pub mod tests { } } - // Fifth read : succesful for one more byte + // Fifth read : successful for one more byte out.resize(1, 0); match reader3.read_and_forget(&mut out) { Ok(1) => { diff --git a/src/mem.rs b/src/mem.rs index bb069484b..6d933003d 100644 --- a/src/mem.rs +++ b/src/mem.rs @@ -64,7 +64,7 @@ pub enum FlushCompress { /// All of the input data so far will be available to the decompressor (as /// with `Flush::Sync`. This completes the current deflate block and follows /// it with an empty fixed codes block that is 10 bites long, and it assures - /// that enough bytes are output in order for the decompessor to finish the + /// that enough bytes are output in order for the decompressor to finish the /// block before the empty fixed code block. Partial = ffi::MZ_PARTIAL_FLUSH as isize, @@ -411,7 +411,7 @@ impl Decompress { /// Creates a new object ready for decompressing data that it's given. /// - /// The Deompress object produced by this constructor expects gzip headers + /// The Decompress object produced by this constructor expects gzip headers /// for the compressed data. /// /// # Panics diff --git a/src/zlib/write.rs b/src/zlib/write.rs index 7135c343c..f6840336f 100644 --- a/src/zlib/write.rs +++ b/src/zlib/write.rs @@ -139,7 +139,7 @@ impl ZlibEncoder { Ok(self.inner.take_inner()) } - /// Returns the number of bytes that have been written to this compresor. + /// Returns the number of bytes that have been written to this compressor. /// /// Note that not all bytes written to this object may be accounted for, /// there may still be some active buffering.