Skip to content

Commit

Permalink
Secrecy dependency update from 0.8.0 to 0.10.3 (#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad1slav authored Oct 10, 2024
1 parent 836ffcd commit 8283311
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ hyper-util = { version = "0.1.3", features = ["http1"] }
once_cell = "1.7.2"
percent-encoding = "2.2.0"
pin-project = "1.0.12"
secrecy = "0.8.0"
secrecy = "0.10.3"
serde = { version = "1.0.126", features = ["derive"] }
serde_json = "1.0.64"
serde_path_to_error = "0.1.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/device_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use http::header::ACCEPT;

#[tokio::main]
async fn main() -> octocrab::Result<()> {
let client_id = secrecy::Secret::from(std::env::var("GITHUB_CLIENT_ID").unwrap());
let client_id = secrecy::SecretString::from(std::env::var("GITHUB_CLIENT_ID").unwrap());
let crab = octocrab::Octocrab::builder()
.base_uri("https://github.com")?
.add_header(ACCEPT, "application/json".to_string())
Expand Down
2 changes: 1 addition & 1 deletion examples/get_dependabot_alerts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const REPO: &str = "some-repo";
#[tokio::main]
async fn main() {
// example for Dependabot alerts API with OAuth GitHub App
let client_id = secrecy::Secret::from(std::env::var("GITHUB_CLIENT_ID").unwrap());
let client_id = secrecy::SecretString::from(std::env::var("GITHUB_CLIENT_ID").unwrap());
let crab = octocrab::Octocrab::builder()
.base_uri("https://github.com")
.unwrap()
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ impl Octocrab {

token.set(token_object.token.clone(), expiration);

Ok(SecretString::new(token_object.token))
Ok(SecretString::from(token_object.token))
}

/// Send the given request to the underlying service
Expand Down

0 comments on commit 8283311

Please sign in to comment.