Loading crates/s3s/Cargo.toml +0 −2 Original line number Diff line number Diff line Loading @@ -18,8 +18,6 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [features] default = ["check-bucket-name"] check-bucket-name = [] openssl = ["dep:openssl"] minio = [] Loading crates/s3s/src/path.rs +1 −6 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ //! + [Bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) use std::net::IpAddr; use std::ops::Not as _; /// A path in the S3 storage #[derive(Debug, PartialEq, Eq)] Loading Loading @@ -109,13 +108,9 @@ impl S3Path { } /// See [bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) #[allow(clippy::manual_is_variant_and)] #[allow(clippy::manual_is_variant_and)] // FIXME: https://github.com/rust-lang/rust-clippy/issues/15202 #[must_use] pub fn check_bucket_name(name: &str) -> bool { if cfg!(not(feature = "check-bucket-name")) { return name.is_empty().not(); } if !(3_usize..64).contains(&name.len()) { return false; } Loading Loading
crates/s3s/Cargo.toml +0 −2 Original line number Diff line number Diff line Loading @@ -18,8 +18,6 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [features] default = ["check-bucket-name"] check-bucket-name = [] openssl = ["dep:openssl"] minio = [] Loading
crates/s3s/src/path.rs +1 −6 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ //! + [Bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) use std::net::IpAddr; use std::ops::Not as _; /// A path in the S3 storage #[derive(Debug, PartialEq, Eq)] Loading Loading @@ -109,13 +108,9 @@ impl S3Path { } /// See [bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) #[allow(clippy::manual_is_variant_and)] #[allow(clippy::manual_is_variant_and)] // FIXME: https://github.com/rust-lang/rust-clippy/issues/15202 #[must_use] pub fn check_bucket_name(name: &str) -> bool { if cfg!(not(feature = "check-bucket-name")) { return name.is_empty().not(); } if !(3_usize..64).contains(&name.len()) { return false; } Loading