Fix example-service (#355)

Fixes the compilation of the example-service crate (the Clap trait has been renamed Parser in clap-rs/clap@d840d56).
This commit is contained in:
baptiste0928
2021-11-15 17:39:04 +01:00
committed by GitHub
parent 98c5d2a18b
commit f7c5d6a7c3
3 changed files with 5 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ description = "An example server built on tarpc."
[dependencies]
anyhow = "1.0"
clap = "3.0.0-beta.2"
clap = "3.0.0-beta.5"
log = "0.4"
futures = "0.3"
opentelemetry = { version = "0.16", features = ["rt-tokio"] }

View File

@@ -4,14 +4,14 @@
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
use clap::Clap;
use clap::Parser;
use service::{init_tracing, WorldClient};
use std::{net::SocketAddr, time::Duration};
use tarpc::{client, context, tokio_serde::formats::Json};
use tokio::time::sleep;
use tracing::Instrument;
#[derive(Clap)]
#[derive(Parser)]
struct Flags {
/// Sets the server address to connect to.
#[clap(long)]

View File

@@ -4,7 +4,7 @@
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
use clap::Clap;
use clap::Parser;
use futures::{future, prelude::*};
use rand::{
distributions::{Distribution, Uniform},
@@ -22,7 +22,7 @@ use tarpc::{
};
use tokio::time;
#[derive(Clap)]
#[derive(Parser)]
struct Flags {
/// Sets the port number to listen on.
#[clap(long)]