Skip to content

Commit 56f76fe

Browse files
rm dead RObjectI32Iterator (#39)
1 parent 66f7e1d commit 56f76fe

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

crates/harp/src/object.rs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -451,34 +451,6 @@ impl TryFrom<RObject> for Vec<String> {
451451
}
452452
}
453453

454-
pub struct RObjectI32Iterator {
455-
object: RObject,
456-
current: isize,
457-
size: isize,
458-
}
459-
460-
impl Iterator for RObjectI32Iterator {
461-
type Item = Option<i32>;
462-
463-
fn next(&mut self) -> Option<Self::Item> {
464-
unsafe {
465-
self.current += 1;
466-
467-
if self.current >= self.size {
468-
None
469-
} else {
470-
// TODO: consider GET_REGION() instead of calling INTEGER_ELT() each time
471-
let value = INTEGER_ELT(self.object.sexp, self.current);
472-
if value == R_NaInt {
473-
Some(None)
474-
} else {
475-
Some(Some(value))
476-
}
477-
}
478-
}
479-
}
480-
}
481-
482454
impl TryFrom<RObject> for Vec<Option<String>> {
483455
type Error = crate::error::Error;
484456
fn try_from(value: RObject) -> Result<Self, Self::Error> {

0 commit comments

Comments
 (0)