diff --git a/capnp/src/lib.rs b/capnp/src/lib.rs index 3bb7703b7..57f4a45b5 100644 --- a/capnp/src/lib.rs +++ b/capnp/src/lib.rs @@ -388,7 +388,7 @@ pub enum ErrorKind { UnalignedSegment, /// Unexpected far pointer - UnexepectedFarPointer, + UnexpectedFarPointer, /// Unknown pointer type. UnknownPointerType, @@ -586,7 +586,7 @@ impl core::fmt::Display for ErrorKind { Self::TriedToReadFromNullArena => write!(fmt, "Tried to read from null arena"), Self::TypeMismatch => write!(fmt, "type mismatch"), Self::UnalignedSegment => write!(fmt, "Detected unaligned segment. You must either ensure all of your segments are 8-byte aligned, or you must enable the \"unaligned\" feature in the capnp crate"), - Self::UnexepectedFarPointer => write!(fmt, "Unexpected far pointer"), + Self::UnexpectedFarPointer => write!(fmt, "Unexpected far pointer"), Self::UnknownPointerType => write!(fmt, "Unknown pointer type."), } } diff --git a/capnp/src/private/layout.rs b/capnp/src/private/layout.rs index ded5bf901..9c6c2ba4a 100644 --- a/capnp/src/private/layout.rs +++ b/capnp/src/private/layout.rs @@ -3028,7 +3028,7 @@ impl<'a> PointerReader<'a> { unsafe { wire_helpers::follow_fars(self.arena, self.pointer, self.segment_id)? }; match unsafe { (*reff).kind() } { - WirePointerKind::Far => Err(Error::from_kind(ErrorKind::UnexepectedFarPointer)), + WirePointerKind::Far => Err(Error::from_kind(ErrorKind::UnexpectedFarPointer)), WirePointerKind::Struct => Ok(PointerType::Struct), WirePointerKind::List => Ok(PointerType::List), WirePointerKind::Other => {