Skip to content

Commit

Permalink
Spellchecking comments, rm trailing spaces (#284)
Browse files Browse the repository at this point in the history
* Spellchecking comments, rm trailing spaces

* revert vendor file changes
  • Loading branch information
nyurik authored Dec 14, 2021
1 parent 0fa0a7b commit b2e976d
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/deflateencoder-read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<u8>> {
let mut result = Vec::new();
let c = b"hello world";
Expand Down
2 changes: 1 addition & 1 deletion src/deflate/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<W: Write> DeflateEncoder<W> {
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.
Expand Down
2 changes: 1 addition & 1 deletion src/ffi/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/gz/bufread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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) => {
Expand Down
4 changes: 2 additions & 2 deletions src/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zlib/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<W: Write> ZlibEncoder<W> {
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.
Expand Down

0 comments on commit b2e976d

Please sign in to comment.