From 31d918da8faaeac2f1a98593e9ad9ff62274a4bd Mon Sep 17 00:00:00 2001 From: Denis Drakhnia Date: Wed, 17 Jan 2024 17:24:26 +0200 Subject: [PATCH] query: replace get(0) with first() --- query/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query/src/main.rs b/query/src/main.rs index fa8fcde..116f3e9 100644 --- a/query/src/main.rs +++ b/query/src/main.rs @@ -570,7 +570,7 @@ fn list_servers(cli: &Cli) -> Result<(), Error> { } fn execute(cli: Cli) -> Result<(), Error> { - match cli.args.get(0).map(|s| s.as_str()).unwrap_or_default() { + match cli.args.first().map(|s| s.as_str()).unwrap_or_default() { "all" | "" => query_server_info(&cli, &[])?, "info" => query_server_info(&cli, &cli.args[1..])?, "list" => list_servers(&cli)?,