Skip to content
This repository was archived by the owner on Dec 10, 2022. It is now read-only.

Commit d4438e2

Browse files
authored
Merge pull request #44 from tox-rs/edition_2018
Edition 2018
2 parents 8df9341 + 3a80d6b commit d4438e2

File tree

4 files changed

+8
-23
lines changed

4 files changed

+8
-23
lines changed

Cargo.lock

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ repository = "https://github.com/tox-rs/tox-node/"
1313
keywords = ["p2p", "instant-messaging", "tox", "toxcore", "networking"]
1414
categories = ["multimedia"]
1515
license = "MIT"
16+
edition = "2018"
1617

1718
[dependencies]
1819
chrono = "0.4"
@@ -27,8 +28,7 @@ regex = "1"
2728
tokio = "0.1.7"
2829
tokio-codec = "0.1"
2930
config = "0.9"
30-
serde = "1.0"
31-
serde_derive = "1.0"
31+
serde = { version = "1.0", features = ["derive"] }
3232
serde_yaml = "0.8.8"
3333
tox = { git = "https://github.com/tox-rs/tox.git" }
3434

src/main.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
extern crate chrono;
21
#[macro_use]
32
extern crate clap;
4-
extern crate env_logger;
5-
extern crate failure;
6-
extern crate futures;
7-
extern crate hex;
8-
extern crate itertools;
93
#[macro_use]
104
extern crate log;
11-
extern crate regex;
12-
#[cfg(unix)]
13-
extern crate syslog;
14-
extern crate tokio;
15-
extern crate tokio_codec;
16-
extern crate config;
17-
#[macro_use]
18-
extern crate serde_derive;
19-
extern crate serde;
20-
extern crate serde_yaml;
21-
extern crate tox;
225

236
mod node_config;
247
mod motd;
@@ -48,8 +31,8 @@ use tox::toxcore::stats::Stats;
4831
#[cfg(unix)]
4932
use syslog::Facility;
5033

51-
use node_config::*;
52-
use motd::{Motd, Counters};
34+
use crate::node_config::*;
35+
use crate::motd::{Motd, Counters};
5336

5437
/// Channel size for onion messages between UDP and TCP relay.
5538
const ONION_CHANNEL_SIZE: usize = 32;

src/node_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::path::Path;
55
use std::collections::HashMap;
66

77
use config::{Config, File as CfgFile};
8-
use serde::de::{self, Deserialize, Deserializer};
8+
use serde::{de, Deserialize, Deserializer};
99
use serde_yaml::Value;
1010
use clap::{App, AppSettings, Arg, SubCommand, ArgMatches};
1111
use hex::FromHex;

0 commit comments

Comments
 (0)