From 219f14355b5df9a93210895d47f77b028291e788 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 6 Jun 2023 19:06:56 +0200 Subject: Rename `into_u16` to `as_u16` --- src/syntax/source.rs | 2 +- src/syntax/span.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/source.rs b/src/syntax/source.rs index f67ed656..277271db 100644 --- a/src/syntax/source.rs +++ b/src/syntax/source.rs @@ -282,7 +282,7 @@ impl SourceId { } /// Extract the underlying number. - pub const fn into_u16(self) -> u16 { + pub const fn as_u16(self) -> u16 { self.0 } } diff --git a/src/syntax/span.rs b/src/syntax/span.rs index 0e4ec215..91e0a3cf 100644 --- a/src/syntax/span.rs +++ b/src/syntax/span.rs @@ -56,7 +56,7 @@ impl Span { /// Pack the components into a span. #[track_caller] const fn pack(id: SourceId, number: u64) -> Span { - let bits = ((id.into_u16() as u64) << Self::BITS) | number; + let bits = ((id.as_u16() as u64) << Self::BITS) | number; match NonZeroU64::new(bits) { Some(v) => Self(v), None => panic!("span encoding is zero"), -- cgit v1.2.3