Skip to content

Commit c529968

Browse files
Merge pull request #32 from CleverCloud/devel/fdubois/chore/update-deps
Update dependencies
2 parents 6a9e80d + 7cf6982 commit c529968

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,31 @@ keywords = [
1919
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
2020

2121
[dependencies]
22-
async-trait = { version = "^0.1.58", optional = true }
23-
base64 = { version = "^0.13.1", optional = true }
24-
bytes = { version = "^1.3.0", features = ["serde"], optional = true }
22+
async-trait = { version = "^0.1.66", optional = true }
23+
base64 = { version = "^0.21.0", optional = true }
24+
bytes = { version = "^1.4.0", features = ["serde"], optional = true }
2525
cidr = { version = "^0.2.1", optional = true }
2626
crypto-common = { version = "^0.1.6", optional = true }
2727
headers = { version = "^0.3.8", optional = true }
2828
hmac = { version = "^0.12.1", features = ["std"], optional = true }
29-
hyper = { version = "^0.14.23", default-features = false, optional = true }
29+
hyper = { version = "^0.14.24", default-features = false, optional = true }
3030
hyper-tls = { version = "^0.5.0", optional = true }
3131
hyper-proxy = { version = "^0.9.1", default-features = false, features = ["tls"], optional = true }
3232
lazy_static = { version = "^1.4.0", optional = true }
3333
log = { version = "^0.4.17", optional = true }
3434
prometheus = { version = "^0.13.3", optional = true }
35-
serde = { version = "^1.0.147", features = ["derive"], optional = true }
36-
serde_json = { version = "^1.0.88", features = [
35+
serde = { version = "^1.0.152", features = ["derive"], optional = true }
36+
serde_json = { version = "^1.0.94", features = [
3737
"preserve_order",
3838
"float_roundtrip",
3939
], optional = true }
4040
sha2 = { version = "^0.10.6", optional = true }
41-
thiserror = { version = "^1.0.37", optional = true }
41+
thiserror = { version = "^1.0.39", optional = true }
4242
tracing = { version = "^0.1.37", optional = true }
4343
tracing-futures = { version = "^0.2.5", optional = true }
4444
url = { version = "^2.3.1", default-features = false, features = ["serde"], optional = true }
4545
urlencoding = { version = "^2.1.2", optional = true }
46-
uuid = { version = "^1.2.2", features = ["serde", "v4"], optional = true }
46+
uuid = { version = "^1.3.0", features = ["serde", "v4"], optional = true }
4747

4848
[features]
4949
default = ["client", "proxy", "logging"]

src/client/mod.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use std::{
1515
};
1616

1717
use async_trait::async_trait;
18+
use base64::{engine::general_purpose::STANDARD as BASE64_ENGINE, Engine};
1819
use bytes::Buf;
1920
use crypto_common::InvalidLength;
2021
use hmac::{Hmac, Mac};
@@ -242,15 +243,6 @@ impl OAuth1 for Signer {
242243
params
243244
}
244245

245-
#[cfg_attr(feature = "trace", tracing::instrument)]
246-
fn signing_key(&self) -> String {
247-
format!(
248-
"{}&{}",
249-
urlencoding::encode(&self.credentials.consumer_secret.to_owned()),
250-
urlencoding::encode(&self.credentials.secret.to_owned())
251-
)
252-
}
253-
254246
#[cfg_attr(feature = "trace", tracing::instrument)]
255247
fn signature(&self, method: &str, endpoint: &str) -> Result<String, Self::Error> {
256248
let (host, query) = match endpoint.find(|c| '?' == c) {
@@ -294,7 +286,16 @@ impl OAuth1 for Signer {
294286
hasher.update(base.as_bytes());
295287

296288
let digest = hasher.finalize().into_bytes();
297-
Ok(base64::encode(digest.as_slice()))
289+
Ok(BASE64_ENGINE.encode(digest.as_slice()))
290+
}
291+
292+
#[cfg_attr(feature = "trace", tracing::instrument)]
293+
fn signing_key(&self) -> String {
294+
format!(
295+
"{}&{}",
296+
urlencoding::encode(&self.credentials.consumer_secret.to_owned()),
297+
urlencoding::encode(&self.credentials.secret.to_owned())
298+
)
298299
}
299300
}
300301

0 commit comments

Comments
 (0)