Fix lints

This commit is contained in:
Yehuda Katz 2019-06-29 09:32:58 -07:00
parent 0b15da64c5
commit 5cac3d1135
3 changed files with 2 additions and 16 deletions

View File

@ -5,7 +5,7 @@ crate mod registry;
use crate::errors::ShellError;
crate use hir::baseline_parse_tokens::{baseline_parse_tokens, trace_remaining};
crate use hir::baseline_parse_tokens::baseline_parse_tokens;
crate use parse::call_node::CallNode;
crate use parse::files::Files;
crate use parse::flag::Flag;

View File

@ -6,7 +6,6 @@ use crate::parser::{
};
use crate::{SpannedItem, Text};
use derive_new::new;
use log::trace;
pub fn baseline_parse_tokens(
token_nodes: &mut TokensIterator<'_>,
@ -332,16 +331,3 @@ impl Iterator for TokensIterator<'a> {
}
}
}
pub fn trace_remaining(desc: &'static str, tail: hir::TokensIterator<'a>, source: &Text) {
trace!(
"{} = {:?}",
desc,
itertools::join(
tail.debug_remaining()
.iter()
.map(|i| format!("%{:?}%", i.debug(source))),
" "
)
);
}

View File

@ -70,7 +70,7 @@ impl fmt::Debug for DebugTokenNode<'a> {
}
)
}
TokenNode::Pipeline(s) => write!(f, "<todo:pipeline>"),
TokenNode::Pipeline(_) => write!(f, "<todo:pipeline>"),
TokenNode::Error(s) => write!(f, "<error> for {:?}", s.span().slice(self.source)),
rest => write!(f, "{}", rest.span().slice(self.source)),
}