mirror of
https://github.com/crate-ci/typos.git
synced 2024-12-22 23:52:12 -05:00
style: Remove unused variable
This commit is contained in:
parent
9f41ead727
commit
5c83dec07b
3 changed files with 2 additions and 6 deletions
|
@ -55,8 +55,7 @@ impl Tokenizer {
|
||||||
|
|
||||||
pub fn parse_bytes<'c>(&'c self, content: &'c [u8]) -> impl Iterator<Item = Identifier<'c>> {
|
pub fn parse_bytes<'c>(&'c self, content: &'c [u8]) -> impl Iterator<Item = Identifier<'c>> {
|
||||||
let iter = if self.unicode && !ByteSlice::is_ascii(content) {
|
let iter = if self.unicode && !ByteSlice::is_ascii(content) {
|
||||||
let iter =
|
let iter = Utf8Chunks::new(content).flat_map(unicode_parser::iter_identifiers);
|
||||||
Utf8Chunks::new(content).flat_map(move |c| unicode_parser::iter_identifiers(c));
|
|
||||||
itertools::Either::Left(iter)
|
itertools::Either::Left(iter)
|
||||||
} else {
|
} else {
|
||||||
itertools::Either::Right(ascii_parser::iter_identifiers(content))
|
itertools::Either::Right(ascii_parser::iter_identifiers(content))
|
||||||
|
|
|
@ -8,7 +8,6 @@ use typos_cli::report::{Context, Message, Report, Typo};
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
pub struct Palette {
|
pub struct Palette {
|
||||||
error: yansi::Style,
|
error: yansi::Style,
|
||||||
warn: yansi::Style,
|
|
||||||
info: yansi::Style,
|
info: yansi::Style,
|
||||||
strong: yansi::Style,
|
strong: yansi::Style,
|
||||||
}
|
}
|
||||||
|
@ -17,7 +16,6 @@ impl Palette {
|
||||||
pub fn colored() -> Self {
|
pub fn colored() -> Self {
|
||||||
Self {
|
Self {
|
||||||
error: yansi::Style::new(yansi::Color::Red),
|
error: yansi::Style::new(yansi::Color::Red),
|
||||||
warn: yansi::Style::new(yansi::Color::Yellow),
|
|
||||||
info: yansi::Style::new(yansi::Color::Blue),
|
info: yansi::Style::new(yansi::Color::Blue),
|
||||||
strong: yansi::Style::default().bold(),
|
strong: yansi::Style::default().bold(),
|
||||||
}
|
}
|
||||||
|
@ -26,7 +24,6 @@ impl Palette {
|
||||||
pub fn plain() -> Self {
|
pub fn plain() -> Self {
|
||||||
Self {
|
Self {
|
||||||
error: yansi::Style::default(),
|
error: yansi::Style::default(),
|
||||||
warn: yansi::Style::default(),
|
|
||||||
info: yansi::Style::default(),
|
info: yansi::Style::default(),
|
||||||
strong: yansi::Style::default(),
|
strong: yansi::Style::default(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ impl BuiltIn {
|
||||||
};
|
};
|
||||||
corrections
|
corrections
|
||||||
.corrections_mut()
|
.corrections_mut()
|
||||||
.for_each(|mut s| case_correct(&mut s, word_token.case()));
|
.for_each(|s| case_correct(s, word_token.case()));
|
||||||
Some(corrections)
|
Some(corrections)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue