From 9456517bed1a9648d835b9c6954dc793e32dbebe Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Thu, 22 May 2025 13:57:55 -0500 Subject: [PATCH] Remove obsolete compatibility for Rust<1.80 --- Cargo.toml | 1 - src/machine/mod.rs | 26 -------------------------- 2 files changed, 27 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ddcf79fd..e7b7f930 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,6 @@ hostname = ["dep:hostname"] tls = ["dep:native-tls"] http = ["dep:warp", "dep:reqwest"] crypto-full = [] -"rust-version-1.80" = [] [build-dependencies] indexmap = "2.3.0" diff --git a/src/machine/mod.rs b/src/machine/mod.rs index da2ab6df..d180f02d 100644 --- a/src/machine/mod.rs +++ b/src/machine/mod.rs @@ -118,32 +118,6 @@ fn current_dir() -> PathBuf { } } -#[cfg(not(feature = "rust-version-1.80"))] -mod libraries { - use indexmap::IndexMap; - use std::sync::OnceLock; - - fn libraries() -> &'static IndexMap<&'static str, &'static str> { - static LIBRARIES: OnceLock> = OnceLock::new(); - LIBRARIES.get_or_init(|| { - let mut m = IndexMap::new(); - - include!(concat!(env!("OUT_DIR"), "/libraries.rs")); - - m - }) - } - - pub(crate) fn contains(name: &str) -> bool { - libraries().contains_key(name) - } - - pub(crate) fn get(name: &str) -> Option<&'static str> { - libraries().get(name).copied() - } -} - -#[cfg(feature = "rust-version-1.80")] mod libraries { use indexmap::IndexMap; use std::sync::LazyLock; -- 2.54.0