mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 04:07:52 +02:00
Remove dead code
This commit is contained in:
@ -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
|
||||
|
@ -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!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user