Skip to content

Commit

Permalink
fix cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorgan committed Sep 9, 2024
1 parent 2c2249e commit 97994df
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/src/raw/oio/list/page_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub trait PageList: Send + Sync + Unpin + 'static {
/// - Set `done` to `true` if all page have been fetched.
/// - Update `token` if there is more page to fetch. `token` is not exposed to users, it's internal used only.
/// - Update `key_marker` and `version_id_marker` if object versioning is enabled and there are more page to fetch.
/// similar to `token`, they should only be internal used
/// similar to `token`, they should only be internal used
/// - Push back into the entries for each entry fetched from underlying storage.
///
/// NOTE: `entries` is a `VecDeque` to avoid unnecessary memory allocation. Only `push_back` is allowed.
Expand Down
2 changes: 1 addition & 1 deletion core/src/raw/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub struct OpList {
///
/// - If `false`, list operation will not return with object versions
/// - If `true`, list operation will return with object versions if object versioning is supported
/// by the underlying service
/// by the underlying service
///
/// Default to `false`
version: bool,
Expand Down
5 changes: 3 additions & 2 deletions core/src/services/s3/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,13 +813,14 @@ impl S3Core {
write!(url, "&max-keys={}", limit).expect("write into string must succeed");
}
if !key_marker.is_empty() {
write!(url, "&key-marker={}", key_marker).expect("write into string must succeed");
write!(url, "&key-marker={}", percent_encode_path(key_marker))
.expect("write into string must succeed");
}
if !version_id_marker.is_empty() {
write!(
url,
"&version-id-marker={}",
percent_encode_path(&version_id_marker)
percent_encode_path(version_id_marker)
)
.expect("write into string must succeed");
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/services/s3/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ impl oio::PageList for S3ObjectVersionsLister {
)?);
if let Some(etag) = version_object.etag {
meta.set_etag(&etag);
meta.set_content_md5(&etag.trim_matches('"'));
meta.set_content_md5(etag.trim_matches('"'));
}

let entry = oio::Entry::new(&path, meta);
Expand Down
4 changes: 2 additions & 2 deletions core/src/types/operator/operator_futures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ impl<F: Future<Output = Result<Vec<Entry>>>> FutureList<F> {
///
/// - If `false`, list operation will not return with object versions
/// - If `true`, list operation will return with object versions if object versioning is supported
/// by the underlying service
/// by the underlying service
///
/// Default to `false`
pub fn version(self, v: bool) -> Self {
Expand Down Expand Up @@ -543,7 +543,7 @@ impl<F: Future<Output = Result<Lister>>> FutureLister<F> {
///
/// - If `false`, list operation will not return with object versions
/// - If `true`, list operation will return with object versions if object versioning is supported
/// by the underlying service
/// by the underlying service
///
/// Default to `false`
pub fn version(self, v: bool) -> Self {
Expand Down
1 change: 0 additions & 1 deletion core/tests/behavior/async_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ pub async fn test_list_files_with_version(op: Operator) -> Result<()> {
op.write(file_path.as_str(), "2").await?;

let mut ds = op.list_with(parent.as_str()).version(true).await?;
println!("{:?}", ds);
ds.retain(|de| de.path() != parent.as_str());

assert_eq!(ds.len(), 2);
Expand Down

0 comments on commit 97994df

Please sign in to comment.