From 2a79b2753cf1c6cb3fbe74a590044da71c0b1581 Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Wed, 9 Dec 2020 17:56:33 +0100 Subject: [PATCH] fix warnings --- src/channel.rs | 2 +- src/main.rs | 8 +++----- src/terminal/compositor.rs | 2 +- src/terminal/terminal.rs | 3 +-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/channel.rs b/src/channel.rs index 8416416..6fe6a46 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -13,7 +13,7 @@ use { }, crate::{ - view::{View, Observer} + view::{Observer} } }; diff --git a/src/main.rs b/src/main.rs index 99c0644..6531224 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,9 +10,7 @@ pub mod vec_buffer; pub mod terminal; use { - async_std::{ - prelude::*, task, stream - }, + async_std::{task}, std::{ sync::{Arc, RwLock} }, @@ -90,12 +88,12 @@ async fn main() { buf.remove(2); task::sleep(std::time::Duration::from_millis(400)).await; - for x in 0 .. 4 { + for _ in 0 .. 4 { buf.remove(0); task::sleep(std::time::Duration::from_millis(400)).await; } }); - Terminal::show(composite_view.into_outer()).await; + Terminal::show(composite_view.into_outer()).await.ok(); } diff --git a/src/terminal/compositor.rs b/src/terminal/compositor.rs index c60e657..a174823 100644 --- a/src/terminal/compositor.rs +++ b/src/terminal/compositor.rs @@ -2,7 +2,7 @@ use { std::sync::{Arc, RwLock}, cgmath::Vector2, crate::{ - view::{View, Observer}, + view::{View}, port::{ViewPort, InnerViewPort, OuterViewPort}, terminal::{TerminalAtom} } diff --git a/src/terminal/terminal.rs b/src/terminal/terminal.rs index f96457d..7ee9cf1 100644 --- a/src/terminal/terminal.rs +++ b/src/terminal/terminal.rs @@ -1,7 +1,6 @@ use { std::io::{Write, stdout, stdin}, - async_std::stream::{Stream, StreamExt}, cgmath::Vector2, termion::{ raw::IntoRawMode, @@ -83,7 +82,7 @@ impl Terminal { write!(out, "{}", atom.c.unwrap_or(' '))?; } else { - write!(out, "{} ", termion::style::Reset); + write!(out, "{} ", termion::style::Reset)?; } }