Skip to content

Commit 2ecd2cd

Browse files
committed
more clippy lints
1 parent 264cd88 commit 2ecd2cd

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

crates/feos/src/estimator/diffusion.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::{DataSet, FeosError, Phase};
22
use feos_core::{DensityInitialization, EntropyScaling, ReferenceSystem, Residual, State};
33
use itertools::izip;
4-
use ndarray::{arr1, Array1};
5-
use quantity::{self, Moles, Pressure, Temperature, CENTI, METER, SECOND};
4+
use ndarray::{Array1, arr1};
5+
use quantity::{self, CENTI, METER, Moles, Pressure, SECOND, Temperature};
66
use std::sync::Arc;
77
use typenum::P2;
88

@@ -69,7 +69,6 @@ impl<E: Residual + EntropyScaling> DataSet<E> for Diffusion {
6969
State::new_npt(eos, t, p, &moles, initial_density)?
7070
.diffusion()
7171
.map(|lambda| lambda.convert_to(self.unit))
72-
.map_err(FeosError::from)
7372
})
7473
.collect()
7574
}

crates/feos/src/estimator/thermal_conductivity.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::{DataSet, FeosError, Phase};
22
use feos_core::{DensityInitialization, EntropyScaling, ReferenceSystem, Residual, State};
33
use itertools::izip;
4-
use ndarray::{arr1, Array1};
5-
use quantity::{self, Moles, Pressure, Temperature, KELVIN, METER, WATT};
4+
use ndarray::{Array1, arr1};
5+
use quantity::{self, KELVIN, METER, Moles, Pressure, Temperature, WATT};
66
use std::sync::Arc;
77

88
/// Store experimental thermal conductivity data.
@@ -67,7 +67,6 @@ impl<E: Residual + EntropyScaling> DataSet<E> for ThermalConductivity {
6767
State::new_npt(eos, t, p, &moles, initial_density)?
6868
.thermal_conductivity()
6969
.map(|lambda| lambda.convert_to(self.unit))
70-
.map_err(FeosError::from)
7170
})
7271
.collect()
7372
}

crates/feos/src/estimator/viscosity.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::{DataSet, FeosError, Phase};
22
use feos_core::{DensityInitialization, EntropyScaling, ReferenceSystem, Residual, State};
33
use itertools::izip;
4-
use ndarray::{arr1, Array1};
5-
use quantity::{Moles, Pressure, Temperature, MILLI, PASCAL, SECOND};
4+
use ndarray::{Array1, arr1};
5+
use quantity::{MILLI, Moles, PASCAL, Pressure, SECOND, Temperature};
66
use std::sync::Arc;
77

88
/// Store experimental viscosity data.
@@ -67,7 +67,6 @@ impl<E: Residual + EntropyScaling> DataSet<E> for Viscosity {
6767
State::new_npt(eos, t, p, &moles, initial_density)?
6868
.viscosity()
6969
.map(|viscosity| viscosity.convert_to(self.unit))
70-
.map_err(FeosError::from)
7170
})
7271
.collect()
7372
}

py-feos/src/estimator.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,7 @@ impl PyEstimator {
617617
/// List[DataSet]
618618
#[getter]
619619
fn get_datasets(&self) -> Vec<PyDataSet> {
620-
self.0
621-
.datasets()
622-
.iter()
623-
.cloned()
624-
.map(|ds| PyDataSet(ds))
625-
.collect()
620+
self.0.datasets().iter().cloned().map(PyDataSet).collect()
626621
}
627622

628623
fn _repr_markdown_(&self) -> String {

0 commit comments

Comments
 (0)