Fixes

A couple of small fixes. Remove unnecessary `to_vec` allocation in `from_buffer` and fix `ByteString::as_slice`.