From cf7857354f211da469ff0ba8388d2878943a4229 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 20 May 2024 11:40:44 -0700 Subject: [PATCH] Fix warning about unused Permissions --- crates/cargo-util/src/paths.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cargo-util/src/paths.rs b/crates/cargo-util/src/paths.rs index 7a19479ad80..aed6ce3b1b4 100644 --- a/crates/cargo-util/src/paths.rs +++ b/crates/cargo-util/src/paths.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use filetime::FileTime; use std::env; use std::ffi::{OsStr, OsString}; -use std::fs::{self, File, Metadata, OpenOptions, Permissions}; +use std::fs::{self, File, Metadata, OpenOptions}; use std::io; use std::io::prelude::*; use std::iter; @@ -197,7 +197,7 @@ pub fn write_atomic, C: AsRef<[u8]>>(path: P, contents: C) -> Res let mask = u32::from(libc::S_IRWXU | libc::S_IRWXG | libc::S_IRWXO); let mode = meta.permissions().mode() & mask; - Permissions::from_mode(mode) + std::fs::Permissions::from_mode(mode) }); let mut tmp = TempFileBuilder::new()