Skip to content

Commit 72480ef

Browse files
committed
use more miri-friendly way to get pointer to slice data
1 parent a2d9a3d commit 72480ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: capnp/src/constant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ pub struct Reader<T> {
4242
impl <T> Reader<T> where T: for<'a> Owned<'a> {
4343
/// Retrieve the value.
4444
pub fn get(&self) -> Result<<T as Owned<'static>>::Reader> {
45-
any_pointer::Reader::new(PointerReader::get_root_unchecked(&self.words[0] as *const Word)).get_as()
45+
any_pointer::Reader::new(PointerReader::get_root_unchecked(self.words.as_ptr())).get_as()
4646
}
4747
}

0 commit comments

Comments
 (0)