Skip to content

Conversation

@Wandalen
Copy link
Contributor

No description provided.

@Wandalen Wandalen marked this pull request as draft October 19, 2024 07:07
@Wandalen Wandalen marked this pull request as ready for review October 19, 2024 07:35
@Wandalen
Copy link
Contributor Author

@jgarzik ready for review

Copy link
Contributor

@jgarzik jgarzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small cleanups needed. no major problems.

users/Cargo.toml Outdated
libc.workspace = true
chrono.workspace = true
syslog = "6.1"
libcrypt-rs = "0.1.2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always delete the micro version from dependencies.

/// Specifies the group ID or group name. This is a positional argument that must be provided.
#[arg(value_name = "GROUP", required = true)]
group: String,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See datetime/cal.rs for an example of the new style of struct Args with translation support added.

Follow cal.rs style of struct Args.

users/newgrp.rs Outdated
None
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use plib::curuser::login_name() ?

users/newgrp.rs Outdated
None
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use plib::curuser::tty?

users/newgrp.rs Outdated
setlocale(LocaleCategory::LcAll, "");
textdomain(PROJECT_NAME)?;
bind_textdomain_codeset(PROJECT_NAME, "UTF-8")?;
let mut exit_code = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new style: put translation setup before Args parsing.

@jgarzik jgarzik added the enhancement New feature or request label Oct 20, 2024
@Wandalen Wandalen marked this pull request as draft October 22, 2024 13:28
@Wandalen Wandalen marked this pull request as ready for review October 23, 2024 13:29
@Wandalen
Copy link
Contributor Author

@jgarzik also ready

@jgarzik jgarzik merged commit b6a8ccd into rustcoreutils:main Oct 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants