File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -526,10 +526,10 @@ pub struct SourceSpan {
526
526
527
527
impl SourceSpan {
528
528
/// Create a new [`SourceSpan`].
529
- pub const fn new ( start : SourceOffset , length : SourceOffset ) -> Self {
529
+ pub const fn new ( start : SourceOffset , length : usize ) -> Self {
530
530
Self {
531
531
offset : start,
532
- length : length . offset ( ) ,
532
+ length,
533
533
}
534
534
}
535
535
@@ -559,8 +559,8 @@ impl From<(ByteOffset, usize)> for SourceSpan {
559
559
}
560
560
}
561
561
562
- impl From < ( SourceOffset , SourceOffset ) > for SourceSpan {
563
- fn from ( ( start, len) : ( SourceOffset , SourceOffset ) ) -> Self {
562
+ impl From < ( SourceOffset , usize ) > for SourceSpan {
563
+ fn from ( ( start, len) : ( SourceOffset , usize ) ) -> Self {
564
564
Self :: new ( start, len)
565
565
}
566
566
}
Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ impl ForwardsTo {
406
406
fn new ( ) -> Self {
407
407
ForwardsTo {
408
408
src : SNIPPET_TEXT . into ( ) ,
409
- label : SourceSpan :: new ( 11 . into ( ) , 6 . into ( ) ) ,
409
+ label : SourceSpan :: new ( 11 . into ( ) , 6 ) ,
410
410
}
411
411
}
412
412
}
You can’t perform that action at this time.
0 commit comments