mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-12-23 08:47:53 +00:00
movin and shufflin
This commit is contained in:
parent
f0e2df202a
commit
375992ea0d
1 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue