1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

chore: fix windows clippy errors (#18670)

This commit is contained in:
David Sherret 2023-04-12 13:13:06 -04:00 committed by Levente Kurusa
parent 709cfd6d91
commit e556a3a962
No known key found for this signature in database
GPG key ID: 9F72F3C05BA137C4

View file

@ -812,24 +812,24 @@ impl File for StdFileResource {
.await
}
fn chmod_sync(self: Rc<Self>, mode: u32) -> FsResult<()> {
fn chmod_sync(self: Rc<Self>, _mode: u32) -> FsResult<()> {
#[cfg(unix)]
{
sync(self, |file| {
use std::os::unix::prelude::PermissionsExt;
file.set_permissions(fs::Permissions::from_mode(mode))
file.set_permissions(fs::Permissions::from_mode(_mode))
})
}
#[cfg(not(unix))]
Err(FsError::NotSupported)
}
async fn chmod_async(self: Rc<Self>, mode: u32) -> FsResult<()> {
async fn chmod_async(self: Rc<Self>, _mode: u32) -> FsResult<()> {
#[cfg(unix)]
{
nonblocking(self, move |file| {
use std::os::unix::prelude::PermissionsExt;
file.set_permissions(fs::Permissions::from_mode(mode))
file.set_permissions(fs::Permissions::from_mode(_mode))
})
.await
}