From 6c162e6562c3e432bf04c82a3d1d789d80761a86 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 8 May 2019 17:37:38 -0700 Subject: 2018 edition idioms. --- examples/decode.rs | 4 +--- examples/enum_external.rs | 4 +--- examples/toml2json.rs | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'examples') diff --git a/examples/decode.rs b/examples/decode.rs index e8ce586..b5d6a99 100644 --- a/examples/decode.rs +++ b/examples/decode.rs @@ -3,9 +3,7 @@ #![deny(warnings)] -extern crate toml; -#[macro_use] -extern crate serde_derive; +use serde_derive::Deserialize; /// This is what we're going to decode into. Each field is optional, meaning /// that it doesn't have to be present in TOML. diff --git a/examples/enum_external.rs b/examples/enum_external.rs index e2ac4f8..a7dd84a 100644 --- a/examples/enum_external.rs +++ b/examples/enum_external.rs @@ -3,9 +3,7 @@ #![deny(warnings)] -extern crate toml; -#[macro_use] -extern crate serde_derive; +use serde_derive::Deserialize; /// This is what we're going to decode into. #[derive(Debug, Deserialize)] diff --git a/examples/toml2json.rs b/examples/toml2json.rs index 12c3f1c..1b90c9f 100644 --- a/examples/toml2json.rs +++ b/examples/toml2json.rs @@ -1,8 +1,5 @@ #![deny(warnings)] -extern crate serde_json; -extern crate toml; - use std::env; use std::fs::File; use std::io; -- cgit v1.2.3