diff --git a/extendr-api/src/ownership.rs b/extendr-api/src/ownership.rs index de3ee39dbe..ea6d39c7f2 100644 --- a/extendr-api/src/ownership.rs +++ b/extendr-api/src/ownership.rs @@ -280,7 +280,6 @@ impl Ownership { mod test { use super::*; use crate::*; - use libR_sys::{Rf_ScalarInteger, Rf_protect, Rf_unprotect}; #[test] fn basic_test() { diff --git a/extendr-api/src/robj/into_robj.rs b/extendr-api/src/robj/into_robj.rs index ddadd54755..5108131cca 100644 --- a/extendr-api/src/robj/into_robj.rs +++ b/extendr-api/src/robj/into_robj.rs @@ -1,6 +1,5 @@ use super::*; use crate::scalar::Scalar; -use crate::single_threaded; mod repeat_into_robj; diff --git a/extendr-api/src/robj/mod.rs b/extendr-api/src/robj/mod.rs index 6064b5ce2a..15a5912e84 100644 --- a/extendr-api/src/robj/mod.rs +++ b/extendr-api/src/robj/mod.rs @@ -17,7 +17,6 @@ use crate::*; use crate::scalar::{Rbool, Rfloat, Rint}; use std::collections::HashMap; -use std::iter::IntoIterator; use std::ops::{Range, RangeInclusive}; // deprecated diff --git a/extendr-api/src/scalar/rbool.rs b/extendr-api/src/scalar/rbool.rs index e3c2ca79d2..935c38dbc5 100644 --- a/extendr-api/src/scalar/rbool.rs +++ b/extendr-api/src/scalar/rbool.rs @@ -1,7 +1,6 @@ use crate::scalar::macros::*; use crate::scalar::Scalar; use crate::*; -use std::convert::TryFrom; /// `Rbool` is a wrapper for `i32` in the context of an R's logical vector. /// diff --git a/extendr-api/src/scalar/rfloat.rs b/extendr-api/src/scalar/rfloat.rs index 96e9408a71..66f6d4f2c2 100644 --- a/extendr-api/src/scalar/rfloat.rs +++ b/extendr-api/src/scalar/rfloat.rs @@ -2,7 +2,6 @@ use crate::prelude::{Rint, Scalar}; use crate::scalar::macros::*; use crate::*; use std::cmp::Ordering::*; -use std::convert::TryFrom; use std::ops::{Add, Div, Mul, Neg, Sub}; use std::ops::{AddAssign, DivAssign, MulAssign, SubAssign}; diff --git a/extendr-api/src/scalar/rint.rs b/extendr-api/src/scalar/rint.rs index 55d2ff0c81..002be52584 100644 --- a/extendr-api/src/scalar/rint.rs +++ b/extendr-api/src/scalar/rint.rs @@ -2,7 +2,6 @@ use crate::scalar::macros::*; use crate::scalar::Scalar; use crate::*; use std::cmp::Ordering::*; -use std::convert::TryFrom; use std::ops::{Add, Div, Mul, Neg, Not, Sub}; use std::ops::{AddAssign, DivAssign, MulAssign, SubAssign}; diff --git a/extendr-api/src/wrapper/altrep.rs b/extendr-api/src/wrapper/altrep.rs index aa80faebdd..123cd2252e 100644 --- a/extendr-api/src/wrapper/altrep.rs +++ b/extendr-api/src/wrapper/altrep.rs @@ -1,4 +1,4 @@ -use prelude::{Rbool, Rcplx, Rfloat, Rint, Scalar}; +use prelude::{Rcplx, Rfloat, Rint, Scalar}; use super::*; diff --git a/extendr-api/src/wrapper/complexes.rs b/extendr-api/src/wrapper/complexes.rs index 8cff9d1246..19dd78b1c2 100644 --- a/extendr-api/src/wrapper/complexes.rs +++ b/extendr-api/src/wrapper/complexes.rs @@ -1,6 +1,5 @@ use super::scalar::{c64, Rcplx}; use super::*; -use std::iter::FromIterator; /// An obscure `NA`-aware wrapper for R's complex vectors. /// Can be used to iterate over vectors obtained from R diff --git a/extendr-api/src/wrapper/doubles.rs b/extendr-api/src/wrapper/doubles.rs index 2be0b2cb8b..b0b51e710d 100644 --- a/extendr-api/src/wrapper/doubles.rs +++ b/extendr-api/src/wrapper/doubles.rs @@ -1,6 +1,5 @@ use super::scalar::{Rfloat, Scalar}; use super::*; -use std::iter::FromIterator; /// An obscure `NA`-aware wrapper for R's double vectors. /// Can be used to iterate over vectors obtained from R diff --git a/extendr-api/src/wrapper/integers.rs b/extendr-api/src/wrapper/integers.rs index 559be0fb9c..ebefe24776 100644 --- a/extendr-api/src/wrapper/integers.rs +++ b/extendr-api/src/wrapper/integers.rs @@ -1,6 +1,5 @@ use super::scalar::{Rint, Scalar}; use super::*; -use std::iter::FromIterator; /// An obscure `NA`-aware wrapper for R's integer vectors. /// Can be used to iterate over vectors obtained from R diff --git a/extendr-api/src/wrapper/list.rs b/extendr-api/src/wrapper/list.rs index b86fff4bd4..9cd338528d 100644 --- a/extendr-api/src/wrapper/list.rs +++ b/extendr-api/src/wrapper/list.rs @@ -1,6 +1,3 @@ -use crate::robj::Attributes; -use std::iter::FromIterator; - use super::*; #[derive(PartialEq, Clone)] diff --git a/extendr-api/src/wrapper/logicals.rs b/extendr-api/src/wrapper/logicals.rs index 0b1c79d657..0227c55a15 100644 --- a/extendr-api/src/wrapper/logicals.rs +++ b/extendr-api/src/wrapper/logicals.rs @@ -1,6 +1,5 @@ -use super::scalar::{Rbool, Scalar}; +use super::scalar::Scalar; use super::*; -use std::iter::FromIterator; /// An obscure `NA`-aware wrapper for R's logical vectors. /// Can be used to iterate over vectors obtained from R diff --git a/extendr-api/src/wrapper/matrix.rs b/extendr-api/src/wrapper/matrix.rs index cd9617c5ba..aee3c02970 100644 --- a/extendr-api/src/wrapper/matrix.rs +++ b/extendr-api/src/wrapper/matrix.rs @@ -1,7 +1,6 @@ //! Wrappers for matrices with deferred arithmetic. use super::*; -use crate::robj::GetSexp; use crate::scalar::Scalar; use std::ops::{Index, IndexMut}; diff --git a/extendr-api/src/wrapper/mod.rs b/extendr-api/src/wrapper/mod.rs index 0f7f7c2553..3049932591 100644 --- a/extendr-api/src/wrapper/mod.rs +++ b/extendr-api/src/wrapper/mod.rs @@ -1,7 +1,7 @@ //! Wrappers are lightweight proxies for references to R datatypes. //! They do not contain an Robj (see array.rs for an example of this). -use crate::robj::{GetSexp, Rinternals}; +use crate::robj::Rinternals; use crate::*; use libR_sys::*; diff --git a/extendr-api/src/wrapper/strings.rs b/extendr-api/src/wrapper/strings.rs index e243673c95..7f185d2ae0 100644 --- a/extendr-api/src/wrapper/strings.rs +++ b/extendr-api/src/wrapper/strings.rs @@ -1,6 +1,3 @@ -use std::convert::From; -use std::iter::FromIterator; - use super::*; #[derive(PartialEq, Clone)] diff --git a/extendr-macros/src/wrappers.rs b/extendr-macros/src/wrappers.rs index 42604f20c4..e85be8d3bf 100644 --- a/extendr-macros/src/wrappers.rs +++ b/extendr-macros/src/wrappers.rs @@ -160,7 +160,7 @@ pub fn make_function_wrappers( Ok(_self_robj) ) }; - + // TODO: the unsafe in here is unnecessary wrappers.push(parse_quote!( #[no_mangle] #[allow(non_snake_case, clippy::not_unsafe_ptr_arg_deref)]