refactor: SequenceNumberSet::as_bytes -> to_bytes

The conversion is not (always) a cheap cast/conversion, and therefore
should be prefixed with "to_" and not "as_".
pull/24376/head
Dom Dwyer 2023-01-17 11:36:36 +01:00
parent ac1502aeba
commit 1805f7fbe3
No known key found for this signature in database
GPG Key ID: E4C40DBD9157879A
1 changed files with 2 additions and 2 deletions

View File

@ -31,12 +31,12 @@ impl SequenceNumberSet {
self.0.andnot_inplace(&other.0)
}
/// Serialise `self` into a set of bytes.
/// Serialise `self` into an array of bytes.
///
/// [This document][spec] describes the serialised format.
///
/// [spec]: https://github.com/RoaringBitmap/RoaringFormatSpec/
pub fn as_bytes(&self) -> Vec<u8> {
pub fn to_bytes(&self) -> Vec<u8> {
self.0.serialize()
}