Skip to content

Commit

Permalink
Merge branch 'trunk' into poljar/check-if-len-fits-in-usize
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorKoenders committed Jan 25, 2022
2 parents 9fe5d1b + e036a40 commit c6c9b3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions readme.md
Expand Up @@ -70,7 +70,7 @@ Bincode's format is specified in [docs/spec.md](https://github.com/bincode-org/b

The encoding format is stable, provided the same configuration is used.
This should ensure that later versions can still read data produced by a previous versions of the library if no major version change
has occured.
has occurred.

Bincode 1 and 2 are completely compatible if the same configuration is used.

Expand Down Expand Up @@ -99,7 +99,7 @@ maximum size limit. Malicious inputs will fail upon deserialization.

### What is Bincode's MSRV (minimum supported Rust version)?

Bincode 2.0 is still in development and does not yet have a targetted MSRV. Once 2.0 is fully released the MSRV will be locked. After this point any changes to the MSRV are considered a breaking change for semver purposes.
Bincode 2.0 is still in development and does not yet have a targeted MSRV. Once 2.0 is fully released the MSRV will be locked. After this point any changes to the MSRV are considered a breaking change for semver purposes.

### Why does bincode not respect `#[repr(u8)]`?

Expand Down
16 changes: 8 additions & 8 deletions src/error.rs
Expand Up @@ -15,23 +15,23 @@ pub enum EncodeError {
type_name: &'static str,
},

/// An uncommon error occured, see the inner text for more information
/// An uncommon error occurred, see the inner text for more information
Other(&'static str),

/// An uncommon error occured, see the inner text for more information
/// An uncommon error occurred, see the inner text for more information
#[cfg(feature = "alloc")]
OtherString(alloc::string::String),

/// A `std::path::Path` was being encoded but did not contain a valid `&str` representation
#[cfg(feature = "std")]
InvalidPathCharacters,

/// The targetted writer encountered an `std::io::Error`
/// The targeted writer encountered an `std::io::Error`
#[cfg(feature = "std")]
Io {
/// The encountered error
error: std::io::Error,
/// The amount of bytes that were written before the error occured
/// The amount of bytes that were written before the error occurred
index: usize,
},

Expand All @@ -52,7 +52,7 @@ pub enum EncodeError {
},

#[cfg(feature = "serde")]
/// A serde-specific error that occured while decoding.
/// A serde-specific error that occurred while decoding.
Serde(crate::features::serde::EncodeError),
}

Expand All @@ -63,7 +63,7 @@ impl core::fmt::Display for EncodeError {
}
}

/// Errors that can be encounted by decoding a type
/// Errors that can be encountered by decoding a type
#[non_exhaustive]
#[derive(Debug, PartialEq)]
pub enum DecodeError {
Expand Down Expand Up @@ -161,12 +161,12 @@ pub enum DecodeError {
inner: std::ffi::FromVecWithNulError,
},

/// An uncommon error occured, see the inner text for more information
/// An uncommon error occurred, see the inner text for more information
#[cfg(feature = "alloc")]
OtherString(alloc::string::String),

#[cfg(feature = "serde")]
/// A serde-specific error that occured while decoding.
/// A serde-specific error that occurred while decoding.
Serde(crate::features::serde::DecodeError),
}

Expand Down
4 changes: 2 additions & 2 deletions src/features/serde/mod.rs
Expand Up @@ -73,7 +73,7 @@ pub use self::de_borrowed::*;
pub use self::de_owned::*;
pub use self::ser::*;

/// A serde-specific error that occured while decoding.
/// A serde-specific error that occurred while decoding.
#[derive(Debug, PartialEq)]
#[non_exhaustive]
pub enum DecodeError {
Expand Down Expand Up @@ -129,7 +129,7 @@ impl Into<crate::error::DecodeError> for DecodeError {
}
}

/// A serde-specific error that occured while encoding.
/// A serde-specific error that occurred while encoding.
#[derive(Debug, PartialEq)]
#[non_exhaustive]
pub enum EncodeError {
Expand Down

0 comments on commit c6c9b3d

Please sign in to comment.