update dependencies

This commit is contained in:
Aiden McClelland
2022-07-11 16:03:24 -06:00
parent b4d19d71e0
commit 5f79bd9564
10 changed files with 256 additions and 239 deletions

View File

@@ -10,9 +10,9 @@ cbor = ["serde_cbor"]
default = ["cbor"]
[dependencies]
clap = "2.33.3"
futures = "0.3.15"
hyper = { version = "0.14.5", features = [
clap = "3"
futures = "0.3"
hyper = { version = "0.14", features = [
"server",
"http1",
"http2",
@@ -20,13 +20,14 @@ hyper = { version = "0.14.5", features = [
"stream",
"client",
] }
lazy_static = "1.4.0"
reqwest = { version = "0.11.2" }
lazy_static = "1.4"
openssl = { version = "0.10", features = ["vendored"] }
reqwest = { version = "0.11" }
rpc-toolkit-macro = { path = "../rpc-toolkit-macro" }
serde = { version = "1.0.125", features = ["derive"] }
serde_cbor = { version = "0.11.1", optional = true }
serde_json = "1.0.64"
thiserror = "1.0.24"
tokio = { version = "1.4.0", features = ["full"] }
url = "2.2.1"
serde = { version = "1.0", features = ["derive"] }
serde_cbor = { version = "0.11", optional = true }
serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }
url = "2.2.2"
yajrc = { version = "*", path = "../yajrc" }

View File

@@ -96,7 +96,7 @@ pub async fn call_remote<Ctx: Context, Params: Serialize, Res: for<'de> Deserial
pub fn default_arg_parser<T: FromStr<Err = E>, E: Display>(
arg: &str,
_: &ArgMatches<'_>,
_: &ArgMatches,
) -> Result<T, RpcError> {
arg.parse().map_err(|e| RpcError {
data: Some(format!("{}", e).into()),
@@ -106,7 +106,7 @@ pub fn default_arg_parser<T: FromStr<Err = E>, E: Display>(
pub fn default_stdin_parser<T: FromStr<Err = E>, E: Display>(
stdin: &mut Stdin,
_: &ArgMatches<'_>,
_: &ArgMatches,
) -> Result<T, RpcError> {
let mut s = String::new();
stdin.read_line(&mut s).map_err(|e| RpcError {
@@ -125,6 +125,6 @@ pub fn default_stdin_parser<T: FromStr<Err = E>, E: Display>(
})
}
pub fn default_display<T: Display>(t: T, _: &ArgMatches<'_>) {
pub fn default_display<T: Display>(t: T, _: &ArgMatches) {
println!("{}", t)
}

View File

@@ -51,9 +51,9 @@ async fn dothething<
E: Display,
>(
#[context] _ctx: AppState,
#[arg(short = "a")] arg1: Option<String>,
#[arg(short = "b")] val: String,
#[arg(short = "c", help = "I am the flag `c`!")] arg3: bool,
#[arg(short = 'a')] arg1: Option<String>,
#[arg(short = 'b')] val: String,
#[arg(short = 'c', help = "I am the flag `c`!")] arg3: bool,
#[arg(stdin)] structured: U,
) -> Result<(Option<String>, String, bool, U), RpcError> {
Ok((arg1, val, arg3, structured))
@@ -198,8 +198,8 @@ fn cli_example() {
run_cli! ({
command: dothething::<String, _>,
app: app => app
.arg(Arg::with_name("host").long("host").short("h").takes_value(true))
.arg(Arg::with_name("port").long("port").short("p").takes_value(true)),
.arg(Arg::with_name("host").long("host").short('h').takes_value(true))
.arg(Arg::with_name("port").long("port").short('p').takes_value(true)),
context: matches => AppState(Arc::new(ConfigSeed {
host: Host::parse(matches.value_of("host").unwrap_or("localhost")).unwrap(),
port: matches.value_of("port").unwrap_or("8000").parse().unwrap(),