docs(examples): updated imports in client_json example (#2412)
This commit is contained in:
@@ -50,8 +50,7 @@ matches = "0.1"
|
|||||||
num_cpus = "1.0"
|
num_cpus = "1.0"
|
||||||
pretty_env_logger = "0.4"
|
pretty_env_logger = "0.4"
|
||||||
spmc = "0.3"
|
spmc = "0.3"
|
||||||
serde = "1.0"
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_derive = "1.0"
|
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tokio = { version = "1", features = [
|
tokio = { version = "1", features = [
|
||||||
"fs",
|
"fs",
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
#![warn(rust_2018_idioms)]
|
#![warn(rust_2018_idioms)]
|
||||||
|
|
||||||
#[macro_use]
|
use hyper::body::Buf;
|
||||||
extern crate serde_derive;
|
|
||||||
|
|
||||||
use bytes::Buf as _;
|
|
||||||
use hyper::Client;
|
use hyper::Client;
|
||||||
|
use serde::Deserialize;
|
||||||
|
|
||||||
// A simple type alias so as to DRY.
|
// A simple type alias so as to DRY.
|
||||||
type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
|
type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
|
||||||
|
|||||||
Reference in New Issue
Block a user