From 1805f7fbe39cdab61e9609230d46c416246ae5f1 Mon Sep 17 00:00:00 2001 From: Dom Dwyer Date: Tue, 17 Jan 2023 11:36:36 +0100 Subject: [PATCH] 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_". --- data_types/src/sequence_number_set.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_types/src/sequence_number_set.rs b/data_types/src/sequence_number_set.rs index 97a332a8d3..306b388fd4 100644 --- a/data_types/src/sequence_number_set.rs +++ b/data_types/src/sequence_number_set.rs @@ -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 { + pub fn to_bytes(&self) -> Vec { self.0.serialize() }