diff --git a/Cargo.toml b/Cargo.toml index d80447c6..2493220b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0" documentation = "https://docs.rs/octocrab" categories = ["web-programming::http-client"] keywords = ["github", "github-api"] -rust-version = "1.73.0" +rust-version = "1.80" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [package.metadata.docs.rs] @@ -46,7 +46,6 @@ hyper-rustls = { version = "0.27.0", optional = true, default-features = false, hyper-timeout = { version = "0.5.1", optional = true } hyper-tls = { version = "0.6.0", optional = true } 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.10.3" diff --git a/src/lib.rs b/src/lib.rs index 60506e60..42619f4e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -235,13 +235,12 @@ use std::io::Write; use std::marker::PhantomData; use std::pin::Pin; use std::str::FromStr; -use std::sync::{Arc, RwLock}; +use std::sync::{Arc, RwLock, LazyLock}; use web_time::Duration; use http::{header::HeaderName, StatusCode}; use hyper::{Request, Response}; -use once_cell::sync::Lazy; use secrecy::{ExposeSecret, SecretString}; use serde::{Deserialize, Serialize}; use snafu::*; @@ -299,8 +298,8 @@ const GITHUB_BASE_URI: &str = "https://api.github.com"; const GITHUB_BASE_UPLOAD_URI: &str = "https://uploads.github.com"; #[cfg(feature = "default-client")] -static STATIC_INSTANCE: Lazy> = - Lazy::new(|| arc_swap::ArcSwap::from_pointee(Octocrab::default())); +static STATIC_INSTANCE: LazyLock> = + LazyLock::new(|| arc_swap::ArcSwap::from_pointee(Octocrab::default())); /// Formats a GitHub preview from it's name into the full value for the /// `Accept` header.