chore: Update clippy, removes deprecations to make clippy happy

This commit is contained in:
Benjamin Kampmann
2022-02-17 12:12:19 +01:00
parent e9e0ba216b
commit 75f45c8df6
2 changed files with 8 additions and 7 deletions

View File

@@ -71,7 +71,7 @@ matrix-sdk-test = { version = "0.4.0", path = "../matrix-sdk-test" }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
atty = "0.2.14"
clap = "3.0.13"
clap = "3.1.0"
rustyline = "9.0.0"
rustyline-derive = "0.6.0"
syntect = "4.5.0"

View File

@@ -3,7 +3,7 @@ use std::{convert::TryFrom, fmt::Debug, sync::Arc};
#[cfg(not(target_arch = "wasm32"))]
use atty::Stream;
#[cfg(not(target_arch = "wasm32"))]
use clap::{App as Argparse, AppSettings as ArgParseSettings, Arg, ArgMatches};
use clap::{Command as Argparse, Arg, ArgMatches};
use futures::executor::block_on;
use matrix_sdk_base::{RoomInfo, Store};
use ruma::{events::EventType, RoomId, UserId};
@@ -315,10 +315,11 @@ impl Inspector {
async fn parse_and_run(&self, input: &str) {
let argparse = Argparse::new("state-inspector")
.global_setting(ArgParseSettings::DisableHelpFlag)
.global_setting(ArgParseSettings::DisableVersionFlag)
.global_setting(ArgParseSettings::NoBinaryName)
.setting(ArgParseSettings::SubcommandRequiredElseHelp)
.disable_version_flag(true)
.disable_help_flag(true)
.no_binary_name(true)
.subcommand_required(true)
.arg_required_else_help(true)
.subcommands(Inspector::subcommands());
match argparse.try_get_matches_from(input.split_ascii_whitespace()) {
@@ -335,7 +336,7 @@ impl Inspector {
#[cfg(not(target_arch = "wasm32"))]
fn main() {
let argparse = Argparse::new("state-inspector")
.global_setting(ArgParseSettings::DisableVersionFlag)
.disable_version_flag(true)
.arg(Arg::new("database").required(true))
.arg(
Arg::new("json")