Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 163e397

Browse files
committed
rls-span: Delegate remaining steps_between implementations
1 parent 5b2b2a4 commit 163e397

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rls-span/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Step for Column<ZeroIndexed> {
112112

113113
impl Step for Column<OneIndexed> {
114114
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
115-
Some((end.0 - start.0) as usize)
115+
<u32 as Step>::steps_between(&start.0, &end.0)
116116
}
117117

118118
fn replace_one(&mut self) -> Self {
@@ -203,7 +203,7 @@ impl Row<ZeroIndexed> {
203203

204204
impl Step for Row<ZeroIndexed> {
205205
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
206-
Some((end.0 - start.0) as usize)
206+
<u32 as Step>::steps_between(&start.0, &end.0)
207207
}
208208

209209
fn replace_one(&mut self) -> Self {
@@ -231,7 +231,7 @@ impl Step for Row<ZeroIndexed> {
231231

232232
impl Step for Row<OneIndexed> {
233233
fn steps_between(start: &Self, end: &Self) -> Option<usize> {
234-
Some((end.0 - start.0) as usize)
234+
<u32 as Step>::steps_between(&start.0, &end.0)
235235
}
236236

237237
fn replace_one(&mut self) -> Self {

0 commit comments

Comments
 (0)