Remove dead code

This commit is contained in:
Yehuda Katz
2019-05-15 15:58:44 -07:00
parent a5a34b88a8
commit af1963d148
26 changed files with 77 additions and 231 deletions

View File

@ -1,6 +1,7 @@
use rustyline::{completion, Context};
use std::collections::BTreeMap;
#[allow(unused)]
crate struct Completer {
commands: BTreeMap<String, Box<dyn crate::CommandBlueprint>>,
}
@ -10,9 +11,9 @@ impl completion::Completer for Completer {
fn complete(
&self,
line: &str,
pos: usize,
ctx: &Context<'_>,
_line: &str,
_pos: usize,
_ctx: &Context<'_>,
) -> rustyline::Result<(usize, Vec<completion::Pair>)> {
let pairs = self
.commands

View File

@ -5,7 +5,7 @@ use nom::character::complete::one_of;
use nom::multi::separated_list;
use nom::sequence::{preceded, terminated};
use nom::IResult;
use nom::{complete, named, separated_list, ws};
use nom::{complete, named, ws};
use std::str::FromStr;
#[derive(Debug, Clone)]
@ -26,8 +26,6 @@ impl Item {
}
crate fn print_items(items: &[Item]) -> String {
let mut out = String::new();
let formatted = items.iter().map(|item| match item {
Item::Bare(s) => format!("{}", s),
Item::Quoted(s) => format!("{:?}", s),
@ -42,7 +40,7 @@ impl Item {
match self {
Item::Quoted(s) => s,
Item::Bare(s) => s,
Item::Int(i) => unimplemented!(),
Item::Int(_) => unimplemented!(),
}
}
}