We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc0ed9c commit 3c7c82cCopy full SHA for 3c7c82c
flatgfa/src/flatgfa.rs
@@ -452,8 +452,13 @@ impl SeqSpan {
452
(byte_index * 2 + end as usize) as u32
453
}
454
455
+ /// Returns index of the final element in this SeqSpan
456
pub fn end(&self) -> u32 {
- self.start + (self.len - 1) as u32
457
+ if self.len == 0 {
458
+ self.start
459
+ } else {
460
+ self.start + (self.len - 1) as u32
461
+ }
462
463
464
pub fn start_byte_index(&self) -> usize {
@@ -465,6 +470,7 @@ impl SeqSpan {
465
470
466
471
467
472
pub fn end_byte_index(&self) -> usize {
473
+ eprintln!("end/2: {} ; len: {}", self.end() / 2, self.len + 0);
468
474
if self.end() == 1 {
469
475
0
476
} else {
0 commit comments