Closed MathiasKoch closed 3 years ago
I like the approach. Especially that the merge_buffer
does allow you to offload the merge process off the stack.
I am not a big fan of the overlaps()
function, because it is not very readable / unclear what's going on at first. On the other hand it makes the implementation quite concise. So I have no strong opinion either way.
Currently every write out of bounds is just ignored. Returning an error might be better, but I think you would have to wrap the Storage
's Error
type to do that.
I am not a big fan of the overlaps() function, because it is not very readable / unclear what's going on at first. On the other hand it makes the implementation quite concise. So I have no strong opinion either way.
I have the exact same reservation, thus the remark here: https://github.com/rust-embedded-community/embedded-storage/blob/abcbd3df5bbfa32540eb0f0922c8994d688f32aa/src/iter.rs#L34
So anything cleaner or easier to read is more than welcomed!
Could we merge and release this PR as is? Or do any of you have any objections, nit-picks or similar? @Dirbaio @eldruin @Sympatron
I'd say we can. My main concern was that writes out of bounds are just silently ignored, but this could probably be fixed in a separate PR.
This PR implements RMW helpers for Nor flashes.
It was extracted from the previous PR #12, in order to land the traits and release them faster.