Browse Source

query: replace get(0) with first()

ipv6
Denis Drakhnia 10 months ago
parent
commit
31d918da8f
  1. 2
      query/src/main.rs

2
query/src/main.rs

@ -570,7 +570,7 @@ fn list_servers(cli: &Cli) -> Result<(), Error> { @@ -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)?,

Loading…
Cancel
Save