- Notifications
You must be signed in to change notification settings - Fork53
Closed
Description
The implementation for theTransferInPlace operation violates the aliasing rule by creating an immutable reference from a mutable one, but keeping both.
Lines 216 to 222 in1ffb268
| 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 forSpidevTransfer, e.g.read_write_in_place.
Metadata
Metadata
Assignees
Labels
No labels