Queue::write_buffer_with()
should precisely document its Option
return
#7075
Labels
area: documentation
Documentation for crate items, public or private
type: enhancement
New feature or request
Queue::write_buffer_with()
returnsOption<QueueWriteBufferView<'a>>
. Looking at the source, theOption
isNone
on some error conditions. This is unusual, and not clearly documented. I presume the reasonwrite_buffer_with()
works this way is that if any error occurs, it can't return a functionalQueueWriteBufferView
. But in that case, the question remains: is the error also being reported to the error scope? If yes, then callers can just useif let Some(view) = write_buffer_with() { ... do stuff ... }
; if no, then they may need to do additional handling.The return type of
write_buffer_with()
should be clearly documented so that it can be handled appropriately.The text was updated successfully, but these errors were encountered: