dfu-rs / dfu-core

Sans IO core library (traits and tools) for DFU
16 stars 5 forks source link

add write from slice function #6

Closed gnxlxnxx closed 2 years ago

cecton commented 2 years ago

tbh I would prefer this to stay lazy. Here you're allocating a big memory buffer with the whole stuff. Not it really matters for embedded but you know... maybe some device has huge memory I don't know.

Do you know you can put a slice into a cursor and pass that instead?

gnxlxnxx commented 2 years ago

Do you know you can put a slice into a cursor and pass that instead?

No, didn't know this, changed this to use a Cursor now

cecton commented 2 years ago

feel free to merge