Skip to content
Open
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
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no objection to bumping, but this will drop the default rustc on vanilla Ubuntu noble (via apt): https://packages.ubuntu.com/noble/rustc, which is 1.75 right now.

Copy link
Author

@Eveeifyeve Eveeifyeve Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's required for it to not be poisioned, lazylock was implemented in 1.80.

Please see https://doc.rust-lang.org/beta/std/sync/struct.LazyLock.html for more info


# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package.metadata.docs.rs]
Expand Down Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -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<arc_swap::ArcSwap<Octocrab>> =
Lazy::new(|| arc_swap::ArcSwap::from_pointee(Octocrab::default()));
static STATIC_INSTANCE: LazyLock<arc_swap::ArcSwap<Octocrab>> =
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.
Expand Down
Loading