fix clippy
This commit is contained in:
parent
631fdd8b73
commit
9c3a4b8c39
5 changed files with 24 additions and 36 deletions
|
@ -1,19 +1,14 @@
|
|||
use std::collections::{HashMap, HashSet, VecDeque};
|
||||
use std::mem;
|
||||
use std::collections::{HashSet, VecDeque};
|
||||
use std::pin::Pin;
|
||||
use std::sync::Arc;
|
||||
use std::task::{Context, Poll, Waker};
|
||||
|
||||
use anyhow::{Context as AnyhowContext, Error, Result};
|
||||
use futures::{
|
||||
future::{self, BoxFuture, Either, Future, FutureExt, TryFutureExt},
|
||||
stream::{BoxStream, Stream, StreamExt, TryStream},
|
||||
future::{self, Either, Future, FutureExt, TryFutureExt},
|
||||
stream::StreamExt,
|
||||
};
|
||||
use genawaiter::{
|
||||
sync::{gen, Gen},
|
||||
yield_,
|
||||
};
|
||||
use parking_lot::{RwLock, RwLockWriteGuard};
|
||||
use parking_lot::RwLock;
|
||||
use tokio::{
|
||||
io::{
|
||||
self, AsyncBufReadExt, AsyncRead, AsyncWrite, AsyncWriteExt, BufReader, ReadHalf, WriteHalf,
|
||||
|
@ -38,7 +33,7 @@ pub type ResponseSender = mpsc::UnboundedSender<Response>;
|
|||
pub type ResponseStream = mpsc::UnboundedReceiver<Response>;
|
||||
type ResultQueue = Arc<RwLock<VecDeque<HandlerResult>>>;
|
||||
pub type GreetingState = Arc<RwLock<(Option<Response>, Option<Waker>)>>;
|
||||
pub const TAG_PREFIX: &str = "panorama";
|
||||
pub const TAG_PREFIX: &str = "ptag";
|
||||
|
||||
struct HandlerResult {
|
||||
id: usize,
|
||||
|
|
|
@ -153,7 +153,7 @@ impl ClientAuthenticated {
|
|||
reference: "".to_owned(),
|
||||
mailbox: "*".to_owned(),
|
||||
};
|
||||
let (resp, stream) = self.execute(cmd).await?;
|
||||
let (resp, _) = self.execute(cmd).await?;
|
||||
let resp = resp.await?;
|
||||
debug!("list response: {:?}", resp);
|
||||
Ok(())
|
||||
|
@ -164,7 +164,7 @@ impl ClientAuthenticated {
|
|||
let cmd = Command::Select {
|
||||
mailbox: mailbox.as_ref().to_owned(),
|
||||
};
|
||||
let (resp, stream) = self.execute(cmd).await?;
|
||||
let (resp, _) = self.execute(cmd).await?;
|
||||
let resp = resp.await?;
|
||||
debug!("select response: {:?}", resp);
|
||||
Ok(())
|
||||
|
|
|
@ -3,11 +3,7 @@
|
|||
use std::fmt::Debug;
|
||||
use std::str::FromStr;
|
||||
|
||||
use pest::{
|
||||
error::Error,
|
||||
iterators::{Pair, Pairs},
|
||||
Parser,
|
||||
};
|
||||
use pest::{error::Error, iterators::Pair, Parser};
|
||||
|
||||
use crate::response::*;
|
||||
|
||||
|
@ -156,7 +152,7 @@ fn build_msg_att_static(pair: Pair<Rule>) -> AttributeValue {
|
|||
}
|
||||
}
|
||||
|
||||
fn build_envelope(pair: Pair<Rule>) -> Envelope {
|
||||
fn build_envelope(_pair: Pair<Rule>) -> Envelope {
|
||||
// TODO: do this
|
||||
Envelope::default()
|
||||
}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::thread;
|
||||
|
||||
|
|
|
@ -60,21 +60,21 @@ impl Widget for Table {
|
|||
|
||||
for (i, row) in self.rows.iter().enumerate() {
|
||||
// queue!(w, cursor::MoveTo(rect.x, rect.y + i as u16))?;
|
||||
if let Some(v) = self.selected_row {
|
||||
if v == i as u16 {
|
||||
// queue!(
|
||||
// w,
|
||||
// style::SetBackgroundColor(Color::White),
|
||||
// style::SetForegroundColor(Color::Black)
|
||||
// )?;
|
||||
} else {
|
||||
// queue!(
|
||||
// w,
|
||||
// style::SetForegroundColor(Color::White),
|
||||
// style::SetBackgroundColor(Color::Black)
|
||||
// )?;
|
||||
}
|
||||
}
|
||||
// if let Some(v) = self.selected_row {
|
||||
// if v == i as u16 {
|
||||
// // queue!(
|
||||
// // w,
|
||||
// // style::SetBackgroundColor(Color::White),
|
||||
// // style::SetForegroundColor(Color::Black)
|
||||
// // )?;
|
||||
// } else {
|
||||
// // queue!(
|
||||
// // w,
|
||||
// // style::SetForegroundColor(Color::White),
|
||||
// // style::SetBackgroundColor(Color::Black)
|
||||
// // )?;
|
||||
// }
|
||||
// }
|
||||
let mut s = String::with_capacity(rect.w as usize);
|
||||
for (j, cell) in row.iter().enumerate() {
|
||||
s += &cell;
|
||||
|
|
Loading…
Reference in a new issue