uniffi-rs
db89e2b4 - Implement try_read/write for concrete types, not Buf/BufMut generics.

Commit
4 years ago
Implement try_read/write for concrete types, not Buf/BufMut generics. This is a followup to the upgrade of our `bytes` dependency from #454. Our use of the `bytes::Buf` trait assumes that `Buf::chunks` will return all the remaining data. This is not guaranteed by the trait, but it is guaranteed in practice by its implementation on the concrete types that we use. Since we don't really work with any generic `Buf` impl anyway, this commit removes the generics from `ViaFfi::try_read` and `ViaFii:write`, replacing them with the single concrete type that we actually ues in practice. This should reduce potential for future confusion, and also make compilation slightly easier on the Rust compiler.
Author
rfk rfk
Committer
rfk rfk
Parents
Loading