This is an automated email from the ASF dual-hosted git repository. xuanwo pushed a commit to branch make-clippy-happy in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit 434c7a6b66f115b3c3a48a269119883005cd0417 Author: Xuanwo <[email protected]> AuthorDate: Fri Aug 25 09:32:35 2023 +0800 chore: Make clippy happy Signed-off-by: Xuanwo <[email protected]> --- core/tests/behavior/blocking_list.rs | 4 ++-- core/tests/behavior/list.rs | 6 +++--- core/tests/behavior/write.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/tests/behavior/blocking_list.rs b/core/tests/behavior/blocking_list.rs index 96f60bab1..dff03bc0b 100644 --- a/core/tests/behavior/blocking_list.rs +++ b/core/tests/behavior/blocking_list.rs @@ -87,7 +87,7 @@ pub fn test_blocking_list_non_exist_dir(op: BlockingOperator) -> Result<()> { pub fn test_blocking_scan(op: BlockingOperator) -> Result<()> { let parent = uuid::Uuid::new_v4().to_string(); - let expected = vec![ + let expected = [ "x/", "x/y", "x/x/", "x/x/y", "x/x/x/", "x/x/x/y", "x/x/x/x/", ]; for path in expected.iter() { @@ -126,7 +126,7 @@ pub fn test_blocking_scan(op: BlockingOperator) -> Result<()> { pub fn test_blocking_remove_all(op: BlockingOperator) -> Result<()> { let parent = uuid::Uuid::new_v4().to_string(); - let expected = vec![ + let expected = [ "x/", "x/y", "x/x/", "x/x/y", "x/x/x/", "x/x/x/y", "x/x/x/x/", ]; diff --git a/core/tests/behavior/list.rs b/core/tests/behavior/list.rs index 071c8dbc4..492b3c7ca 100644 --- a/core/tests/behavior/list.rs +++ b/core/tests/behavior/list.rs @@ -342,7 +342,7 @@ pub async fn test_list_with_start_after(op: Operator) -> Result<()> { let dir = &format!("{}/", uuid::Uuid::new_v4()); op.create_dir(dir).await?; - let given: Vec<String> = vec!["file-0", "file-1", "file-2", "file-3", "file-4", "file-5"] + let given: Vec<String> = ["file-0", "file-1", "file-2", "file-3", "file-4", "file-5"] .iter() .map(|name| format!("{dir}{name}-{}", uuid::Uuid::new_v4())) .collect(); @@ -392,7 +392,7 @@ pub async fn test_scan_root(op: Operator) -> Result<()> { pub async fn test_scan(op: Operator) -> Result<()> { let parent = uuid::Uuid::new_v4().to_string(); - let expected = vec![ + let expected = [ "x/", "x/y", "x/x/", "x/x/y", "x/x/x/", "x/x/x/y", "x/x/x/x/", ]; for path in expected.iter() { @@ -431,7 +431,7 @@ pub async fn test_scan(op: Operator) -> Result<()> { pub async fn test_remove_all(op: Operator) -> Result<()> { let parent = uuid::Uuid::new_v4().to_string(); - let expected = vec![ + let expected = [ "x/", "x/y", "x/x/", "x/x/y", "x/x/x/", "x/x/x/y", "x/x/x/x/", ]; for path in expected.iter() { diff --git a/core/tests/behavior/write.rs b/core/tests/behavior/write.rs index ae8825984..0ad042295 100644 --- a/core/tests/behavior/write.rs +++ b/core/tests/behavior/write.rs @@ -1194,7 +1194,7 @@ pub async fn test_writer_copy(op: Operator) -> Result<()> { let size = 5 * 1024 * 1024; // write file with 5 MiB let content_a = gen_fixed_bytes(size); let content_b = gen_fixed_bytes(size); - let reader = Cursor::new(vec![content_a.clone(), content_b.clone()].concat()); + let reader = Cursor::new([content_a.clone(), content_b.clone()].concat()); let mut w = op .writer_with(&path)
