-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
The implementation for the TransferInPlace operation violates the aliasing rule by creating an immutable reference from a mutable one, but keeping both.
Lines 216 to 222 in 1ffb268
| SpiOperation::TransferInPlace(buf) => { | |
| let tx = unsafe { | |
| let p = buf.as_ptr(); | |
| std::slice::from_raw_parts(p, buf.len()) | |
| }; | |
| transfers.push(SpidevTransfer::read_write(tx, buf)); | |
| } |
There needs to be a corresponding method for SpidevTransfer, e.g. read_write_in_place.
jamesmunns
Metadata
Metadata
Assignees
Labels
No labels