Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #62

Merged
merged 3 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ doctest = false

[dependencies]
# Follows version used by rustls
base64 = "0.13"
base64 = "0.21"
# Follows version used by http
bytes = "1.0"
futures-util = { version = "0.3", optional = true, features = ["io"] }
Expand Down
15 changes: 10 additions & 5 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ deny = [
{ name = "openssl-sys" },
]
skip = [
# hyper uses an old version...and the newest version
{ name = "itoa", version = "=0.4.8" },
]
skip-tree = []

Expand All @@ -35,13 +33,13 @@ allow = [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"ISC",
]
exceptions = [
{ allow = ["MPL-2.0"], name = "webpki-roots" },
{ allow = ["ISC"], name = "untrusted" },
{ allow = ["ISC"], name = "webpki" },
{ allow = ["ISC", "MIT", "OpenSSL"], name = "ring" },
{ allow = ["OpenSSL"], name = "ring" },
{ allow = ["Zlib"], name = "tinyvec" },
{ allow = ["Unicode-DFS-2016"], name = "unicode-ident" },
]

[[licenses.clarify]]
Expand All @@ -65,6 +63,13 @@ license-files = [
{ path = "LICENSE", hash = 0x001c7e6c },
]

[[licenses.clarify]]
name = "rustls-webpki"
expression = "ISC"
license-files = [
{ path = "LICENSE", hash = 0x001c7e6c },
]

[[licenses.clarify]]
name = "encoding_rs"
expression = "(Apache-2.0 OR MIT) AND BSD-3-Clause"
Expand Down
4 changes: 3 additions & 1 deletion src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ impl ServiceAccount {
},
);

let key_bytes = base64::decode_config(key_string.as_bytes(), base64::STANDARD)
use base64::Engine;
let key_bytes = base64::engine::general_purpose::STANDARD
.decode(key_string.as_bytes())
.map_err(Error::Base64Decode)?;

Ok(Self {
Expand Down
9 changes: 2 additions & 7 deletions src/v1/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,12 @@ pub enum PredefinedAcl {
}

/// Set of properties to return. Defaults to `NoAcl`.
#[derive(Serialize, Copy, Clone, Debug, PartialEq, Eq)]
#[derive(Serialize, Copy, Clone, Debug, PartialEq, Eq, Default)]
#[serde(rename_all = "camelCase")]
pub enum Projection {
/// Include all properties.
Full,
/// Omit the owner, acl property.
#[default]
NoAcl,
}

impl Default for Projection {
fn default() -> Self {
Projection::NoAcl
}
}
4 changes: 2 additions & 2 deletions src/v1/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ macro_rules! __make_obj_url {
format!(
$url,
$authority.as_str(),
percent_encoding::percent_encode($id.bucket().as_ref(), crate::util::PATH_ENCODE_SET),
percent_encoding::percent_encode($id.object().as_ref(), crate::util::PATH_ENCODE_SET)
percent_encoding::percent_encode($id.bucket().as_ref(), $crate::util::PATH_ENCODE_SET),
percent_encoding::percent_encode($id.object().as_ref(), $crate::util::PATH_ENCODE_SET)
)
}};
}
Expand Down