You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Receive &Ptr instead of Ptr in PtrValueIter::new (#119)
```rs
let start: Value<Ptr<u8>> = ...;
PtrValueIter::new((*start.borrow()), __count).collect::<Vec<_>>()
```
tries to move out of `(*start.borrow())` which does not implement the
Copy trait because Ptr does not implement Copy.
To avoid the move, change the `ptr` argument of `PtrValueIter::new` to
`&Ptr<T>` instead of `Ptr<T>`
```rs
pub fn new(ptr: &Ptr<T>, n: usize) -> Self
^
```
This pattern is not new, it's also used in `Ptr::memcpy, Ptr::memset,
Ptr::slice_until`.
0 commit comments