Fix clippy::len_without_is_empty
This commit is contained in:
@@ -67,7 +67,6 @@
|
||||
#![allow(
|
||||
clippy::needless_range_loop,
|
||||
clippy::ptr_arg,
|
||||
clippy::len_without_is_empty,
|
||||
clippy::map_entry,
|
||||
clippy::type_complexity,
|
||||
clippy::too_many_arguments,
|
||||
|
||||
@@ -76,6 +76,11 @@ pub trait BaseVector<T: RealNumber>: Clone + Debug {
|
||||
/// Get number of elevemnt in the vector
|
||||
fn len(&self) -> usize;
|
||||
|
||||
/// Returns true if the vector is empty.
|
||||
fn is_empty(&self) -> bool {
|
||||
self.len() == 0
|
||||
}
|
||||
|
||||
/// Return a vector with the elements of the one-dimensional array.
|
||||
fn to_vec(&self) -> Vec<T>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user