cargo fix --edition-idioms && cargo fmt

This commit is contained in:
Jack Grigg
2019-04-21 00:40:31 +01:00
parent 3fdeb119fc
commit c93ccc8ea5
6 changed files with 7 additions and 13 deletions

View File

@ -1,5 +1,3 @@
extern crate i2p;
use i2p::net::I2pStream;
use std::env;
use std::io::{BufReader, Read, Write};

View File

@ -3,8 +3,6 @@ extern crate nom;
#[macro_use]
extern crate log;
extern crate rand;
pub mod net;
pub mod sam;

View File

@ -92,13 +92,13 @@ impl I2pSocketAddr {
}
impl fmt::Display for I2pSocketAddr {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}:{}", self.dest(), self.port())
}
}
impl fmt::Debug for I2pSocketAddr {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(self, fmt)
}
}

View File

@ -57,13 +57,13 @@ impl I2pAddr {
}
impl fmt::Display for I2pAddr {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(fmt, "{}", self.inner)
}
}
impl fmt::Debug for I2pAddr {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(self, fmt)
}
}

View File

@ -211,7 +211,7 @@ impl Write for I2pStream {
}
impl fmt::Debug for I2pStream {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut res = f.debug_struct("I2pStream");
if let Ok(addr) = self.local_addr() {
@ -338,7 +338,7 @@ impl I2pListener {
/// }
/// }
/// ```
pub fn incoming(&self) -> Incoming {
pub fn incoming(&self) -> Incoming<'_> {
Incoming { listener: self }
}
}
@ -351,7 +351,7 @@ impl<'a> Iterator for Incoming<'a> {
}
impl fmt::Debug for I2pListener {
fn fmt(&self, _f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
unimplemented!()
}
}

View File

@ -1,5 +1,3 @@
extern crate i2p;
#[test]
#[ignore]
fn naming_lookup() {