Skip to content

Commit 94d1252

Browse files
committed
std::vec::Vec::len to Vec::len
1 parent 092b687 commit 94d1252

File tree

6 files changed

+3
-9
lines changed

6 files changed

+3
-9
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ This exposes the types necessary for usage: [`Interpolator`](https://docs.rs/nin
2020
Interpolation is executed by calling [`Interpolator::interpolate`](https://docs.rs/ninterp/latest/ninterp/enum.Interpolator.html#method.interpolate).
2121
The length of the supplied point slice must be equal to the interpolator dimensionality.
2222

23-
### Note
2423
For interpolators of dimensionality N ≥ 1:
2524
- Instantiation is done via the Interpolator enum's `new_*` methods (`new_1d`, `new_2d`, `new_3d`, `new_nd`).
2625
These methods run a validation step that catches any potential errors early, preventing runtime panics.

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//! Interpolation is executed by calling [`Interpolator::interpolate`].
1616
//! The length of the supplied point slice must be equal to the interpolator dimensionality.
1717
//!
18-
//! ## Note
1918
//! For interpolators of dimensionality N ≥ 1:
2019
//! - Instantiation is done via the Interpolator enum's `new_*` methods (`new_1d`, `new_2d`, `new_3d`, `new_nd`).
2120
//! These methods run a validation step that catches any potential errors early, preventing runtime panics.

src/n.rs

-2
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,6 @@ impl InterpMethods for InterpND {
292292

293293
#[cfg(test)]
294294
mod tests {
295-
use core::f64;
296-
297295
use super::*;
298296

299297
#[test]

src/one.rs

-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ impl InterpMethods for Interp1D {
121121

122122
#[cfg(test)]
123123
mod tests {
124-
use core::f64;
125-
126124
use super::*;
127125

128126
#[test]

src/three.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ impl InterpMethods for Interp3D {
139139
if !self
140140
.f_xyz
141141
.iter()
142-
.map(std::vec::Vec::len)
142+
.map(Vec::len)
143143
.all(|y_val_len| y_val_len == y_grid_len)
144144
{
145145
return Err(ValidateError::IncompatibleShapes("y".into()));
146146
}
147147
if !self
148148
.f_xyz
149149
.iter()
150-
.flat_map(|y_vals| y_vals.iter().map(std::vec::Vec::len))
150+
.flat_map(|y_vals| y_vals.iter().map(Vec::len))
151151
.all(|z_val_len| z_val_len == z_grid_len)
152152
{
153153
return Err(ValidateError::IncompatibleShapes("z".into()));

src/two.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl InterpMethods for Interp2D {
115115
if !self
116116
.f_xy
117117
.iter()
118-
.map(std::vec::Vec::len)
118+
.map(Vec::len)
119119
.all(|y_val_len| y_val_len == y_grid_len)
120120
{
121121
return Err(ValidateError::IncompatibleShapes("y".into()));

0 commit comments

Comments
 (0)