heapless icon indicating copy to clipboard operation
heapless copied to clipboard

Implements TryFrom for Deque from array

Open hicklin opened this issue 11 months ago • 1 comments

Fixes #522.

Ideally, this PR is updated after PR #521 is merged to simplify the tests.

This PR implements the TryFrom trait for creating a Deque from a slice.

Note the use of unsafe for copying all bytes from the slice to the Deque buffer after ensuring that the Deque buffer has enough space.

Also note the use of ManuallyDrop to ensure that any heap memory referred to by the element contents is not dropped at the end of this method since the elements in the Deque buffer will be pointing to it.

hicklin avatar Dec 16 '24 14:12 hicklin

@newAM, would you be able to review or remove the change request flag as I don't think that this can be merged while that flag is active.

hicklin avatar May 27 '25 07:05 hicklin

@newAM and @reitermarkus , any chance you can have at look an my replies? @newAM I think your "requested change" flag is still up so this cannot be merged before that flag is cleared.

hicklin avatar Aug 18 '25 10:08 hicklin

@newAM and @reitermarkus , any chance you can have at look an my replies? @newAM I think your "requested change" flag is still up so this cannot be merged before that flag is cleared.

They're not very available these days so best to close this and create another and then I and @sgued can take a look (like done for #571 today).

zeenix avatar Aug 18 '25 12:08 zeenix

OK. I'm closing this PR and opening a new one.

hicklin avatar Aug 18 '25 12:08 hicklin