Skip to content

Commit

Permalink
Update deprecated json-dir-list dependencies
Browse files Browse the repository at this point in the history
Replace unmaintained `users` crate with `uzers` crate.
  • Loading branch information
apmasell authored and avarsava committed Sep 5, 2024
1 parent ccaef48 commit efd97b2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions changes/fix_jdl_deps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Update deprecated dependencies for `json-dir-list`
2 changes: 1 addition & 1 deletion json-dir-list/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ serde = { version = "^1.0", features = ["derive"] }
serde_json = "^1.0"

[target.'cfg(unix)'.dependencies]
users = "^0.11"
uzers = "^0.12"
4 changes: 2 additions & 2 deletions json-dir-list/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ fn write_record(
(time as f64) + (time_ns as f64) / 1e9
}

let Some(user) = users::get_user_by_uid(metadata.uid()) else {
let Some(user) = uzers::get_user_by_uid(metadata.uid()) else {
return;
};
let Some(group) = users::get_group_by_gid(metadata.gid()) else {
let Some(group) = uzers::get_group_by_gid(metadata.gid()) else {
return;
};
output
Expand Down

0 comments on commit efd97b2

Please sign in to comment.