Skip to content

Commit

Permalink
UnexepectedFarPointer -> UnexpectedFarPointer (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha authored Sep 16, 2024
1 parent d2dfc54 commit 77f5207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions capnp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ pub enum ErrorKind {
UnalignedSegment,

/// Unexpected far pointer
UnexepectedFarPointer,
UnexpectedFarPointer,

/// Unknown pointer type.
UnknownPointerType,
Expand Down Expand Up @@ -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."),
}
}
Expand Down
2 changes: 1 addition & 1 deletion capnp/src/private/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 77f5207

Please sign in to comment.