1
0
mirror of https://github.com/actix/examples synced 2025-06-28 09:50:36 +02:00

Fix clippy warnings (#168)

This commit is contained in:
Yuki Okushi
2019-09-05 00:04:57 +09:00
committed by GitHub
parent bb639d5fe3
commit f232b6c684
18 changed files with 41 additions and 46 deletions

View File

@ -18,7 +18,7 @@ use futures::{
fn main() {
::std::env::set_var("RUST_LOG", "actix_web=info");
let _ = env_logger::init();
env_logger::init();
let sys = actix::System::new("ws-example");
Arbiter::spawn(lazy(|| {
@ -27,7 +27,6 @@ fn main() {
.connect()
.map_err(|e| {
println!("Error: {}", e);
()
})
.map(|(response, framed)| {
println!("{:?}", response);
@ -46,8 +45,6 @@ fn main() {
}
addr.do_send(ClientCommand(cmd));
});
()
})
}));
@ -113,9 +110,8 @@ where
T: AsyncRead + AsyncWrite,
{
fn handle(&mut self, msg: Frame, _ctx: &mut Context<Self>) {
match msg {
Frame::Text(txt) => println!("Server: {:?}", txt),
_ => (),
if let Frame::Text(txt) = msg {
println!("Server: {:?}", txt)
}
}