Skip to content

Commit

Permalink
fix clippy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkMyCar committed Jan 30, 2025
1 parent 6e10292 commit e6f3e79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/storage-operators/src/oneshot_source/http_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,8 @@ impl OneshotSource for HttpOneshotSource {

// Get the size of the object from the Conent-Length header.
let size = get_header(&reqwest::header::CONTENT_LENGTH)
.ok_or_else(|| StorageErrorXKind::MissingSize)
.and_then(|s| {
s.parse::<usize>()
.map_err(|e| StorageErrorXKind::generic(e))
})
.ok_or(StorageErrorXKind::MissingSize)
.and_then(|s| s.parse::<usize>().map_err(StorageErrorXKind::generic))
.context("content-length header")?;

// TODO(cf1): We should probably check the content-type as well. At least for advisory purposes.
Expand Down
4 changes: 2 additions & 2 deletions src/storage-operators/src/oneshot_source/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl<S: OneshotSource> AsyncFileReader for ParquetReaderAdapter<S> {
let mut reader = ParquetMetaDataReader::new();
let object_size = self.object.size();
reader.try_load(self, object_size).await?;
reader.finish().map(|metadata| Arc::new(metadata))
reader.finish().map(Arc::new)
})
}
}
Expand Down Expand Up @@ -266,7 +266,7 @@ impl<'de> Deserialize<'de> for ParquetRowGroup {
let struct_array = array_ref
.as_any()
.downcast_ref::<StructArray>()
.ok_or_else(|| serde_err())?;
.ok_or_else(serde_err)?;

Ok(struct_array.clone())
}
Expand Down

0 comments on commit e6f3e79

Please sign in to comment.