diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-01-16 09:34:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 09:34:22 +0300 |
commit | dfac57ef3fdd5ddc884ce7d7559137c5123bae3e (patch) | |
tree | 6ada3d48c665efbca6f897424e50f7ad1b682cb5 /src/lib.rs | |
parent | fe1022f6e6d6012652554e1964601d2827d7048f (diff) | |
download | r-alacritty-vte-dfac57ef3fdd5ddc884ce7d7559137c5123bae3e.tar.gz r-alacritty-vte-dfac57ef3fdd5ddc884ce7d7559137c5123bae3e.tar.bz2 r-alacritty-vte-dfac57ef3fdd5ddc884ce7d7559137c5123bae3e.zip |
Migrate to 2021 edition
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -30,7 +30,7 @@ //! [`Parser`]: struct.Parser.html //! [`Perform`]: trait.Perform.html //! [Paul Williams' ANSI parser state machine]: https://vt100.net/emu/dec_ansi_parser -#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use, clippy::wrong_pub_self_convention)] +#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use)] #![cfg_attr(all(feature = "nightly", test), feature(test))] #![cfg_attr(feature = "no_std", no_std)] @@ -420,7 +420,6 @@ extern crate std; mod tests { use super::*; - use std::string::String; use std::vec::Vec; static OSC_BYTES: &[u8] = &[ @@ -515,7 +514,7 @@ mod tests { #[test] fn parse_osc_max_params() { - let params = std::iter::repeat(";").take(params::MAX_PARAMS + 1).collect::<String>(); + let params = ";".repeat(params::MAX_PARAMS + 1); let input = format!("\x1b]{}\x1b", ¶ms[..]).into_bytes(); let mut dispatcher = Dispatcher::default(); let mut parser = Parser::new(); @@ -656,7 +655,7 @@ mod tests { // This will build a list of repeating '1;'s // The length is MAX_PARAMS - 1 because the last semicolon is interpreted // as an implicit zero, making the total number of parameters MAX_PARAMS - let params = std::iter::repeat("1;").take(params::MAX_PARAMS - 1).collect::<String>(); + let params = "1;".repeat(params::MAX_PARAMS - 1); let input = format!("\x1b[{}p", ¶ms[..]).into_bytes(); let mut dispatcher = Dispatcher::default(); @@ -681,7 +680,7 @@ mod tests { // This will build a list of repeating '1;'s // The length is MAX_PARAMS because the last semicolon is interpreted // as an implicit zero, making the total number of parameters MAX_PARAMS + 1 - let params = std::iter::repeat("1;").take(params::MAX_PARAMS).collect::<String>(); + let params = "1;".repeat(params::MAX_PARAMS); let input = format!("\x1b[{}p", ¶ms[..]).into_bytes(); let mut dispatcher = Dispatcher::default(); @@ -796,7 +795,7 @@ mod tests { #[test] fn parse_dcs_max_params() { - let params = std::iter::repeat("1;").take(params::MAX_PARAMS + 1).collect::<String>(); + let params = "1;".repeat(params::MAX_PARAMS + 1); let input = format!("\x1bP{}p", ¶ms[..]).into_bytes(); let mut dispatcher = Dispatcher::default(); let mut parser = Parser::new(); |