Clean up deprecated and clippy warnings

This commit is contained in:
Dániel Buga
2020-10-05 11:00:07 +02:00
parent 4a09914aa0
commit 71a582b31f
2 changed files with 6 additions and 6 deletions

View File

@@ -169,7 +169,7 @@ named!(
named!(
set_mode<&str, AnsiSequence>,
do_parse!(
tag_s!("[=") >>
tag!("[=") >>
mode: parse_int >>
conv: expr_res!(mode.try_into()) >>
tag!("h") >>
@@ -180,7 +180,7 @@ named!(
named!(
reset_mode<&str, AnsiSequence>,
do_parse!(
tag_s!("[=") >>
tag!("[=") >>
mode: parse_int >>
conv: expr_res!(mode.try_into()) >>
tag!("l") >>
@@ -298,7 +298,7 @@ named!(
named!(
pub parse_escape<&str, Output>,
do_parse!(
tag_s!("\u{1b}") >>
tag!("\u{1b}") >>
seq: combined >>
(Output::Escape(seq))
)

View File

@@ -2,11 +2,11 @@ use crate::enums::{Output};
use crate::parsers::parse_escape;
pub trait AnsiParser {
fn ansi_parse<'a>(&'a self) -> AnsiParseIterator<'a>;
fn ansi_parse(&self) -> AnsiParseIterator<'_>;
}
impl AnsiParser for str {
fn ansi_parse<'a>(&'a self) -> AnsiParseIterator<'a> {
fn ansi_parse(&self) -> AnsiParseIterator<'_> {
AnsiParseIterator {
dat: self
}
@@ -14,7 +14,7 @@ impl AnsiParser for str {
}
impl AnsiParser for String {
fn ansi_parse<'a>(&'a self) -> AnsiParseIterator<'a> {
fn ansi_parse(&self) -> AnsiParseIterator<'_> {
AnsiParseIterator {
dat: self
}