movin and shufflin

This commit is contained in:
Josh Thomas 2025-09-17 10:40:35 -05:00
parent f0e2df202a
commit 375992ea0d

View file

@ -39,11 +39,6 @@ impl Span {
Self::new(start_expand, length_expand)
}
#[must_use]
pub fn as_tuple(self) -> (u32, u32) {
(self.start, self.length)
}
/// Construct a span from integer bounds expressed as byte offsets.
#[must_use]
pub fn from_bounds(start: usize, end: usize) -> Self {
@ -60,6 +55,11 @@ impl Span {
Span::new(start_u32, length_u32)
}
#[must_use]
pub fn as_tuple(self) -> (u32, u32) {
(self.start, self.length)
}
#[must_use]
pub fn start_offset(&self) -> ByteOffset {
ByteOffset(self.start)