From 6bd0d13a607c48e2f025d43619f11eb0d697a1a9 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Mon, 29 Jun 2026 12:16:43 +0900 Subject: [PATCH] chroot: dedup .is_empty() --- src/uu/chroot/src/chroot.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/uu/chroot/src/chroot.rs b/src/uu/chroot/src/chroot.rs index 985d8deb14e..4eb38d71db8 100644 --- a/src/uu/chroot/src/chroot.rs +++ b/src/uu/chroot/src/chroot.rs @@ -203,8 +203,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { commands }; - assert!(!command.is_empty()); - let chroot_command = command[0]; + let chroot_command = *command.first().unwrap(); // NOTE: Tests can only trigger code beyond this point if they're invoked with root permissions set_context(&options)?;