Skip to content

Commit

Permalink
remove the type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC authored and cesarpastorini committed May 3, 2023
1 parent a2cf45d commit b854e7d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ name = "exa"
ansi_term = "0.12"
glob = "0.3"
lazy_static = "1.3"
libc = "0.2"
libc = "0.2.135"
locale = "0.2"
log = "0.4"
natord = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::os::unix::fs::{FileTypeExt, MetadataExt, PermissionsExt};
use std::os::windows::fs::MetadataExt;
use std::path::{Path, PathBuf};
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use libc::{dev_t, major, minor};

use libc::{major, minor};
use log::*;

use crate::fs::dir::Dir;
Expand Down Expand Up @@ -337,8 +337,8 @@ impl<'dir> File<'dir> {
let device_ids = self.metadata.rdev();

f::Size::DeviceIDs(f::DeviceIDs {
major: unsafe{major(device_ids as dev_t)},
minor: unsafe{minor(device_ids as dev_t)},
major: unsafe { major(device_ids) },
minor: unsafe { minor(device_ids) },
})
}
else {
Expand Down

0 comments on commit b854e7d

Please sign in to comment.