Skip to content

Commit

Permalink
fix: fix typos (#175)
Browse files Browse the repository at this point in the history
This also fixes a typo in an error message.
  • Loading branch information
rex4539 authored Jan 23, 2023
1 parent 028e85c commit 05cd72e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/src/serde/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Serde (de)serializtion for [`crate::ipld::Ipld`].
//! Serde (de)serialization for [`crate::ipld::Ipld`].
//!
//! This implementation enables Serde to serialize to/deserialize from [`crate::ipld::Ipld`]
//! values. The `Ipld` enum is similar to the `Value` enum in `serde_json` or `serde_cbor`.
Expand Down Expand Up @@ -117,7 +117,7 @@ mod tests {
assert_roundtrip(&person, &expected_ipld);
}

/// Test that deserializing arbitrary bytes are not accidently recognized as CID.
/// Test that deserializing arbitrary bytes are not accidentally recognized as CID.
#[test]
fn test_bytes_not_cid() {
let cid =
Expand Down
4 changes: 2 additions & 2 deletions core/tests/serde_deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ fn ipld_deserializer_option() {
let ipld_some = Ipld::Integer(option_some.unwrap().into());
let ipld_none = Ipld::Null;

// This is similar to `error_except`, which cannot be used here, as we need to excluse
// This is similar to `error_except`, which cannot be used here, as we need to exclude
// `Ipld::Integer` *and* `Ipld::Null`.
assert!(<Option<u8>>::deserialize(Ipld::Bool(true)).is_err());
assert!(<Option<u8>>::deserialize(Ipld::Float(5.3)).is_err());
Expand Down Expand Up @@ -676,7 +676,7 @@ fn ipld_deserializer_struct_errors() {
assert!(error_wrong.is_err());
}

/// This tests excercises the `deserialize_any` code path.
/// This tests exercises the `deserialize_any` code path.
#[test]
fn ipld_deserializer_ipld() {
let cid = Cid::try_from("bafkreie74tgmnxqwojhtumgh5dzfj46gi4mynlfr7dmm7duwzyvnpw7h7m").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion dag-cbor/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl MissingKey {

/// Unknown cbor tag.
#[derive(Debug, Error)]
#[error("Unkown cbor tag `{0}`.")]
#[error("Unknown cbor tag `{0}`.")]
pub struct UnknownTag(pub u64);

/// Unexpected eof.
Expand Down

0 comments on commit 05cd72e

Please sign in to comment.