summaryrefslogtreecommitdiff
path: root/runtime/ops/fs.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-01-14 20:18:58 -0800
committerGitHub <noreply@github.com>2023-01-14 23:18:58 -0500
commitd5634164cb86771fc279468cbb93e311c1ad3089 (patch)
tree2878a536acdb5106e48488e640cd78dfa2b5893a /runtime/ops/fs.rs
parentefcbfd5206fcdfac55c26a7133c04dd330d047b9 (diff)
chore: use rustfmt imports_granularity option (#17421)
Closes https://github.com/denoland/deno/issues/2699 Closes https://github.com/denoland/deno/issues/2347 Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not need to switch the cargo toolchain to nightly. Do we care about formatting stability of our codebase across Rust versions? (I don't)
Diffstat (limited to 'runtime/ops/fs.rs')
-rw-r--r--runtime/ops/fs.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs
index 2f62e143b..342b0e35d 100644
--- a/runtime/ops/fs.rs
+++ b/runtime/ops/fs.rs
@@ -679,7 +679,9 @@ fn op_chown_sync(
#[cfg(unix)]
{
use crate::errors::get_nix_error_class;
- use nix::unistd::{chown, Gid, Uid};
+ use nix::unistd::chown;
+ use nix::unistd::Gid;
+ use nix::unistd::Uid;
let nix_uid = uid.map(Uid::from_raw);
let nix_gid = gid.map(Gid::from_raw);
chown(&path, nix_uid, nix_gid).map_err(|err| {
@@ -717,7 +719,9 @@ async fn op_chown_async(
#[cfg(unix)]
{
use crate::errors::get_nix_error_class;
- use nix::unistd::{chown, Gid, Uid};
+ use nix::unistd::chown;
+ use nix::unistd::Gid;
+ use nix::unistd::Uid;
let nix_uid = uid.map(Uid::from_raw);
let nix_gid = gid.map(Gid::from_raw);
chown(&path, nix_uid, nix_gid).map_err(|err| {
@@ -1488,7 +1492,8 @@ fn op_symlink_sync(
}
#[cfg(not(unix))]
{
- use std::os::windows::fs::{symlink_dir, symlink_file};
+ use std::os::windows::fs::symlink_dir;
+ use std::os::windows::fs::symlink_file;
match _type {
Some(ty) => match ty.as_ref() {