Bumped rust edition from 2021 to 2024. Only change is some include sorting (#128)

This commit is contained in:
Henk-Jan Lebbink
2025-03-11 20:09:43 +01:00
committed by GitHub
parent 48da7630a9
commit 8134acdd09
59 changed files with 201 additions and 117 deletions

View File

@@ -15,9 +15,9 @@
use async_std::task;
use bytes::Bytes;
use rand::SeedableRng;
use rand::distributions::{Alphanumeric, DistString};
use rand::prelude::SmallRng;
use rand::SeedableRng;
use std::path::{Path, PathBuf};
use std::{io, thread};
use tokio::io::AsyncRead;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, TestContext};
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::response::{DeleteBucketEncryptionResponse, GetBucketEncryptionResponse};
use minio::s3::types::{S3Api, SseConfig};

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, TestContext};
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::args::BucketExistsArgs;
#[tokio::test(flavor = "multi_thread", worker_threads = 10)]

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, TestContext};
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::response::{
DeleteBucketLifecycleResponse, GetBucketLifecycleResponse, SetBucketLifecycleResponse,
};

View File

@@ -1,6 +1,6 @@
mod common;
use crate::common::{create_bucket_helper, TestContext};
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::args::{
DeleteBucketNotificationArgs, GetBucketNotificationArgs, SetBucketNotificationArgs,
};
@@ -47,12 +47,16 @@ async fn set_get_delete_bucket_notification() {
.await
.unwrap();
assert_eq!(resp.config.queue_config_list.as_ref().unwrap().len(), 1);
assert!(resp.config.queue_config_list.as_ref().unwrap()[0]
.events
.contains(&String::from("s3:ObjectCreated:Put")));
assert!(resp.config.queue_config_list.as_ref().unwrap()[0]
.events
.contains(&String::from("s3:ObjectCreated:Copy")));
assert!(
resp.config.queue_config_list.as_ref().unwrap()[0]
.events
.contains(&String::from("s3:ObjectCreated:Put"))
);
assert!(
resp.config.queue_config_list.as_ref().unwrap()[0]
.events
.contains(&String::from("s3:ObjectCreated:Copy"))
);
assert_eq!(
resp.config.queue_config_list.as_ref().unwrap()[0]
.prefix_filter_rule

View File

@@ -1,4 +1,4 @@
use crate::common::{create_bucket_helper, TestContext};
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::types::S3Api;
mod common;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, TestContext};
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::args::{DeleteBucketTagsArgs, GetBucketTagsArgs, SetBucketTagsArgs};
use std::collections::HashMap;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, TestContext};
use crate::common::{TestContext, create_bucket_helper};
use minio::s3::builders::VersioningStatus;
use minio::s3::response::GetBucketVersioningResponse;
use minio::s3::types::S3Api;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, TestContext};
use crate::common::{RandReader, TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::{ComposeObjectArgs, ComposeSource, PutObjectArgs, StatObjectArgs};
use minio::s3::types::S3Api;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, TestContext};
use crate::common::{RandReader, TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::{CopyObjectArgs, CopySource, PutObjectArgs, StatObjectArgs};
use minio::s3::types::S3Api;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{rand_bucket_name, TestContext};
use crate::common::{TestContext, rand_bucket_name};
use minio::s3::args::{BucketExistsArgs, MakeBucketArgs, RemoveBucketArgs};
#[tokio::test(flavor = "multi_thread", worker_threads = 10)]

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, TestContext};
use crate::common::{TestContext, create_bucket_helper, rand_object_name};
use bytes::Bytes;
use minio::s3::args::{GetObjectArgs, PutObjectArgs};
use minio::s3::types::S3Api;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, TestContext};
use crate::common::{TestContext, create_bucket_helper, rand_object_name};
use http::Method;
use minio::s3::args::GetPresignedObjectUrlArgs;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, TestContext};
use crate::common::{TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::PostPolicy;
use minio::s3::utils::utc_now;

View File

@@ -1,4 +1,4 @@
use crate::common::{create_bucket_helper, CleanupGuard, TestContext};
use crate::common::{CleanupGuard, TestContext, create_bucket_helper};
// MinIO Rust Library for Amazon S3 Compatible Cloud Storage
// Copyright 2025 MinIO, Inc.
//

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, TestContext};
use crate::common::{RandReader, TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::PutObjectArgs;
use minio::s3::builders::ObjectToDelete;
use minio::s3::types::ToStream;

View File

@@ -15,12 +15,12 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, TestContext};
use crate::common::{RandReader, TestContext, create_bucket_helper, rand_object_name};
use async_std::task;
use minio::s3::Client;
use minio::s3::args::PutObjectArgs;
use minio::s3::creds::StaticProvider;
use minio::s3::types::{NotificationRecords, S3Api};
use minio::s3::Client;
use tokio::sync::mpsc;
use tokio_stream::StreamExt;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{rand_bucket_name, CleanupGuard, TestContext};
use crate::common::{CleanupGuard, TestContext, rand_bucket_name};
use minio::s3::args::{
DeleteObjectLockConfigArgs, GetObjectLockConfigArgs, MakeBucketArgs, SetObjectLockConfigArgs,
};

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{rand_bucket_name, rand_object_name, CleanupGuard, RandReader, TestContext};
use crate::common::{CleanupGuard, RandReader, TestContext, rand_bucket_name, rand_object_name};
use minio::s3::args::{
GetObjectRetentionArgs, MakeBucketArgs, PutObjectArgs, SetObjectRetentionArgs,
};

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, TestContext};
use crate::common::{RandReader, TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::{DeleteObjectTagsArgs, GetObjectTagsArgs, PutObjectArgs, SetObjectTagsArgs};
use minio::s3::types::S3Api;
use std::collections::HashMap;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, RandSrc, TestContext};
use crate::common::{RandReader, RandSrc, TestContext, create_bucket_helper, rand_object_name};
use http::header;
use minio::s3::args::{PutObjectArgs, StatObjectArgs};
use minio::s3::builders::ObjectContent;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, TestContext};
use crate::common::{RandReader, TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::PutObjectArgs;
use minio::s3::builders::ObjectToDelete;
use minio::s3::types::ToStream;

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, TestContext};
use crate::common::{TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::{PutObjectArgs, SelectObjectContentArgs};
use minio::s3::types::{
CsvInputSerialization, CsvOutputSerialization, FileHeaderInfo, QuoteFields, S3Api,

View File

@@ -15,7 +15,7 @@
mod common;
use crate::common::{create_bucket_helper, rand_object_name, RandReader, TestContext};
use crate::common::{RandReader, TestContext, create_bucket_helper, rand_object_name};
use minio::s3::args::{DownloadObjectArgs, UploadObjectArgs};
use minio::s3::types::S3Api;
use sha2::{Digest, Sha256};