Avoid force unwrapping here. I ended up using UnwrappedResults() erroneously to match the existing signature ([]byte, error) over Results() which would more safely return (*[]byte, error). The existing signature is the way it is because []byte can have a nil state, which isn't expressible at a generic level.
Add some special casing to transform the Option[[]byte] into []byte by mapping the None case to nil == []byte{}.
Avoid force unwrapping here. I ended up using
UnwrappedResults()
erroneously to match the existing signature([]byte, error)
overResults()
which would more safely return(*[]byte, error)
. The existing signature is the way it is because[]byte
can have anil
state, which isn't expressible at a generic level.Add some special casing to transform the
Option[[]byte]
into[]byte
by mapping theNone
case tonil == []byte{}
.