Skip to content

Commit

Permalink
Fix incorrect code doc (#5177)
Browse files Browse the repository at this point in the history
Fix incorrect comment
  • Loading branch information
Tyera authored Aug 30, 2023
1 parent db5eaa7 commit fd67d99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/pod/src/bytemuck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn pod_from_bytes_mut<T: Pod>(bytes: &mut [u8]) -> Result<&mut T, ProgramErr
bytemuck::try_from_bytes_mut(bytes).map_err(|_| ProgramError::InvalidArgument)
}

/// Convert a slice into a mutable `Pod` slice (zero copy)
/// Convert a slice into a `Pod` slice (zero copy)
pub fn pod_slice_from_bytes<T: Pod>(bytes: &[u8]) -> Result<&[T], ProgramError> {
bytemuck::try_cast_slice(bytes).map_err(|_| ProgramError::InvalidArgument)
}
Expand Down

0 comments on commit fd67d99

Please sign in to comment.