Skip to content

Commit

Permalink
Merge pull request #598 from anforowicz/clippy-cleanup
Browse files Browse the repository at this point in the history
Clean up `rustc` and `clippy` warnings.
  • Loading branch information
mystor committed Apr 1, 2024
2 parents abb7411 + a920923 commit 9bf5bbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Bytes>),
}
Expand Down
2 changes: 1 addition & 1 deletion src/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> = Cell::new(false);
pub(super) static DISABLE_SPANNED_DESERIALIZATION: Cell<bool> = const { Cell::new(false) };
}

/// A spanned value, indicating the range at which it is defined in the source.
Expand Down
1 change: 1 addition & 0 deletions src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down

0 comments on commit 9bf5bbe

Please sign in to comment.