Bumped rust edition from 2021 to 2024. Only change is some include sorting (#128)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user