Skip to content

Commit 6ed80d3

Browse files
committed
fix clippy lints
1 parent d64dfd5 commit 6ed80d3

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

metropolis-core/src/io/csv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn write_csv_with_prefix<D: ToArrow<J>, const J: usize>(
4747
prefix: &str,
4848
) -> Result<()> {
4949
let batches = D::to_arrow(data)?;
50-
for (name, maybe_batch) in D::names().into_iter().zip(batches.into_iter()) {
50+
for (name, maybe_batch) in D::names().into_iter().zip(batches) {
5151
if let Some(batch) = maybe_batch {
5252
let filename: PathBuf = [output_dir.to_str().unwrap(), &format!("{prefix}{name}.csv")]
5353
.iter()

metropolis-core/src/io/parquet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn write_parquet_with_prefix<D: ToArrow<J>, const J: usize>(
4545
prefix: &str,
4646
) -> Result<()> {
4747
let batches = D::to_arrow(data)?;
48-
for (name, maybe_batch) in D::names().into_iter().zip(batches.into_iter()) {
48+
for (name, maybe_batch) in D::names().into_iter().zip(batches) {
4949
if let Some(batch) = maybe_batch {
5050
let filename: PathBuf = [
5151
output_dir.to_str().unwrap(),

metropolis-core/src/network/road_network/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ impl RoadEdge {
531531
} else if let (Some(times), Some(flows)) = (bottleneck_times, bottleneck_flows) {
532532
let values: Vec<_> = times
533533
.into_iter()
534-
.zip(flows.into_iter())
534+
.zip(flows)
535535
.map(|(t, f)| -> Result<(NonNegativeSeconds, Flow)> {
536536
Ok((NonNegativeSeconds::try_from(t)?, Flow::try_from(f)?))
537537
})

tch/src/io/csv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use super::arrow::ToArrow;
3434
/// Write data that can be converted to arrow format as a CSV file.
3535
pub fn write_csv<D: ToArrow<J>, const J: usize>(data: &D, output_dir: &Path) -> Result<()> {
3636
let batches = D::to_arrow(data, true)?;
37-
for (name, maybe_batch) in D::names().into_iter().zip(batches.into_iter()) {
37+
for (name, maybe_batch) in D::names().into_iter().zip(batches) {
3838
if let Some(batch) = maybe_batch {
3939
let filename: PathBuf = [output_dir.to_str().unwrap(), &format!("{name}.csv")]
4040
.iter()

tch/src/io/parquet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use super::arrow::ToArrow;
3030
/// Writes data that can be converted to arrow format as a parquet file.
3131
pub fn write_parquet<D: ToArrow<J>, const J: usize>(data: &D, output_dir: &Path) -> Result<()> {
3232
let batches = D::to_arrow(data, false)?;
33-
for (name, maybe_batch) in D::names().into_iter().zip(batches.into_iter()) {
33+
for (name, maybe_batch) in D::names().into_iter().zip(batches) {
3434
if let Some(batch) = maybe_batch {
3535
let filename: PathBuf = [output_dir.to_str().unwrap(), &format!("{name}.parquet")]
3636
.iter()

0 commit comments

Comments
 (0)