1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

Merge pull request #6772 from lcheylus/openbsd-users-clippy

users: fix lint error manual_unwrap_or_default on OpenBSD
This commit is contained in:
Sylvestre Ledru 2024-10-07 18:11:58 +02:00 committed by GitHub
commit fae477b3e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,7 +51,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
#[cfg(target_os = "openbsd")]
{
let filename = maybe_file.unwrap_or(Path::new(OPENBSD_UTMP_FILE));
let entries = parse_from_path(filename).unwrap_or(Vec::new());
let entries = parse_from_path(filename).unwrap_or_default();
users = Vec::new();
for entry in entries {
if let UtmpEntry::UTMP {