diff --git a/src/network.rs b/src/network.rs index 48d054d1..521d287b 100644 --- a/src/network.rs +++ b/src/network.rs @@ -28,7 +28,10 @@ use crate::{ /// Wrapper for the pair of a `reqwest::Response` and the `SemaphorePermit` used /// to limit concurrent connections, with a test-only variant for mocking. enum Response<'a> { - Real(reqwest::Response, tokio::sync::SemaphorePermit<'a>), + Real( + reqwest::Response, + #[allow(unused)] tokio::sync::SemaphorePermit<'a>, + ), #[cfg(test)] Mock(Option), } diff --git a/src/serialization.rs b/src/serialization.rs index b21f9c74..32c5f015 100644 --- a/src/serialization.rs +++ b/src/serialization.rs @@ -518,7 +518,7 @@ pub mod spanned { thread_local! { /// Hack to work around `toml::Spanned` failing to be deserialized when /// used with the `toml::Value` deserializer. - pub(super) static DISABLE_SPANNED_DESERIALIZATION: Cell = Cell::new(false); + pub(super) static DISABLE_SPANNED_DESERIALIZATION: Cell = const { Cell::new(false) }; } /// A spanned value, indicating the range at which it is defined in the source. diff --git a/src/storage.rs b/src/storage.rs index ed407ea9..b2ad98a3 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -2828,6 +2828,7 @@ fn create_unpack_lock(unpack_dir: &Path) -> Result<(), io::Error> { // which may have been extracted from the package. let mut ok = OpenOptions::new() .create(true) + .truncate(true) .read(true) .write(true) .open(lockfile)?;