diff --git a/crates/nu-command/src/system/registry_query.rs b/crates/nu-command/src/system/registry_query.rs index 30bb2c34dd..5ec441e261 100644 --- a/crates/nu-command/src/system/registry_query.rs +++ b/crates/nu-command/src/system/registry_query.rs @@ -151,7 +151,7 @@ fn get_reg_hive(call: &Call) -> Result { Vec::new(), )); } - let hive = flags.get(0).copied().unwrap_or("hkcu"); + let hive = flags.first().copied().unwrap_or("hkcu"); let hkey = match hive { "hkcr" => HKEY_CLASSES_ROOT, "hkcu" => HKEY_CURRENT_USER,