Skip to content

Commit

Permalink
use more miri-friendly way to get pointer to slice data
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Jan 16, 2020
1 parent a2d9a3d commit 72480ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capnp/src/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ pub struct Reader<T> {
impl <T> Reader<T> where T: for<'a> Owned<'a> {
/// Retrieve the value.
pub fn get(&self) -> Result<<T as Owned<'static>>::Reader> {
any_pointer::Reader::new(PointerReader::get_root_unchecked(&self.words[0] as *const Word)).get_as()
any_pointer::Reader::new(PointerReader::get_root_unchecked(self.words.as_ptr())).get_as()
}
}

0 comments on commit 72480ef

Please sign in to comment.