cargo fix --edition-idioms && cargo fmt
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
extern crate i2p;
|
||||
|
||||
use i2p::net::I2pStream;
|
||||
use std::env;
|
||||
use std::io::{BufReader, Read, Write};
|
||||
|
@ -3,8 +3,6 @@ extern crate nom;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate rand;
|
||||
|
||||
pub mod net;
|
||||
pub mod sam;
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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!()
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
extern crate i2p;
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn naming_lookup() {
|
||||
|
Reference in New Issue
Block a user