diff options
author | Christian Duerr <contact@christianduerr.com> | 2021-02-13 18:15:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-13 18:15:57 +0000 |
commit | d872b9f3aed225bcae74ee3707a690c1a096608e (patch) | |
tree | f0686a59463c65e218b4b3945b6249ecc1dfc0f3 /alacritty_terminal | |
parent | a5e2ccd5aba720cc63af4079e7f5e5afb6d9b893 (diff) | |
download | alacritty-d872b9f3aed225bcae74ee3707a690c1a096608e.tar.gz alacritty-d872b9f3aed225bcae74ee3707a690c1a096608e.zip |
Update dependencies
This introduces some duplicate dependencies, though they are necessary
to build properly without any warnings.
Fixes #4735.
Diffstat (limited to 'alacritty_terminal')
-rw-r--r-- | alacritty_terminal/src/ansi.rs | 24 | ||||
-rw-r--r-- | alacritty_terminal/src/config/mod.rs | 4 | ||||
-rw-r--r-- | alacritty_terminal/src/event_loop.rs | 2 | ||||
-rw-r--r-- | alacritty_terminal/src/term/color.rs | 4 | ||||
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs index 8f2264af..560b8e00 100644 --- a/alacritty_terminal/src/ansi.rs +++ b/alacritty_terminal/src/ansi.rs @@ -372,7 +372,7 @@ impl Default for CursorShape { pub enum Mode { /// ?1 CursorKeys = 1, - /// Select 80 or 132 columns per page. + /// Select 80 or 132 columns per page (DECCOLM). /// /// CSI ? 3 h -> set 132 column font. /// CSI ? 3 l -> reset 80 column font. @@ -383,7 +383,7 @@ pub enum Mode { /// * erases all data in page memory /// * resets DECLRMM to unavailable /// * clears data from the status line (if set to host-writable) - DECCOLM = 3, + ColumnMode = 3, /// IRM Insert Mode. /// /// NB should be part of non-private mode enum. @@ -440,7 +440,7 @@ impl Mode { if private { Some(match num { 1 => Mode::CursorKeys, - 3 => Mode::DECCOLM, + 3 => Mode::ColumnMode, 6 => Mode::Origin, 7 => Mode::LineWrap, 12 => Mode::BlinkingCursor, @@ -1404,7 +1404,7 @@ mod tests { let mut parser = Processor::new(); let mut handler = MockHandler::default(); - for byte in &BYTES[..] { + for byte in BYTES { parser.advance(&mut handler, *byte, &mut io::sink()); } @@ -1418,7 +1418,7 @@ mod tests { let mut parser = Processor::new(); let mut handler = MockHandler::default(); - for byte in &bytes[..] { + for byte in bytes { parser.advance(&mut handler, *byte, &mut io::sink()); } @@ -1427,7 +1427,7 @@ mod tests { let bytes: &[u8] = &[0x1b, b'[', b'c']; - for byte in &bytes[..] { + for byte in bytes { parser.advance(&mut handler, *byte, &mut io::sink()); } @@ -1436,7 +1436,7 @@ mod tests { let bytes: &[u8] = &[0x1b, b'[', b'0', b'c']; - for byte in &bytes[..] { + for byte in bytes { parser.advance(&mut handler, *byte, &mut io::sink()); } @@ -1450,7 +1450,7 @@ mod tests { let mut parser = Processor::new(); let mut handler = MockHandler::default(); - for byte in &bytes[..] { + for byte in bytes { parser.advance(&mut handler, *byte, &mut io::sink()); } @@ -1462,7 +1462,7 @@ mod tests { let mut parser = Processor::new(); let mut handler = MockHandler::default(); - for byte in &bytes[..] { + for byte in bytes { parser.advance(&mut handler, *byte, &mut io::sink()); } @@ -1480,7 +1480,7 @@ mod tests { let mut parser = Processor::new(); let mut handler = MockHandler::default(); - for byte in &BYTES[..] { + for byte in BYTES { parser.advance(&mut handler, *byte, &mut io::sink()); } @@ -1511,7 +1511,7 @@ mod tests { let mut handler = MockHandler::default(); let mut parser = Processor::new(); - for byte in &BYTES[..] { + for byte in BYTES { parser.advance(&mut handler, *byte, &mut io::sink()); } } @@ -1522,7 +1522,7 @@ mod tests { let mut parser = Processor::new(); let mut handler = MockHandler::default(); - for byte in &BYTES[..] { + for byte in BYTES { parser.advance(&mut handler, *byte, &mut io::sink()); } diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs index 59449faa..0b313598 100644 --- a/alacritty_terminal/src/config/mod.rs +++ b/alacritty_terminal/src/config/mod.rs @@ -105,8 +105,8 @@ impl Cursor { } } -#[serde(untagged)] #[derive(Deserialize, Debug, Copy, Clone, PartialEq, Eq)] +#[serde(untagged)] pub enum ConfigCursorStyle { Shape(CursorShape), WithBlinking { @@ -174,8 +174,8 @@ impl From<CursorBlinking> for bool { } } -#[serde(untagged)] #[derive(Deserialize, Debug, Clone, PartialEq, Eq)] +#[serde(untagged)] pub enum Program { Just(String), WithArgs { diff --git a/alacritty_terminal/src/event_loop.rs b/alacritty_terminal/src/event_loop.rs index 2fe3f64e..8a6441ce 100644 --- a/alacritty_terminal/src/event_loop.rs +++ b/alacritty_terminal/src/event_loop.rs @@ -221,7 +221,7 @@ where let mut terminal = None; loop { - match self.pty.reader().read(&mut buf[..]) { + match self.pty.reader().read(buf) { Ok(0) => break, Ok(got) => { // Record bytes read; used to limit time spent in pty_read. diff --git a/alacritty_terminal/src/term/color.rs b/alacritty_terminal/src/term/color.rs index a67e2c6e..32c6af2b 100644 --- a/alacritty_terminal/src/term/color.rs +++ b/alacritty_terminal/src/term/color.rs @@ -115,7 +115,7 @@ impl<'de> Deserialize<'de> for Rgb { where E: serde::de::Error, { - Rgb::from_str(&value[..]).map_err(|_| { + Rgb::from_str(value).map_err(|_| { E::custom(format!( "failed to parse rgb color {}; expected hex color like #ff00ff", value @@ -219,7 +219,7 @@ impl<'de> Deserialize<'de> for CellRgb { _ => (), } - Rgb::from_str(&value[..]).map(CellRgb::Rgb).map_err(|_| { + Rgb::from_str(value).map(CellRgb::Rgb).map_err(|_| { E::custom(format!("failed to parse color {}; expected {}", value, EXPECTING)) }) } diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index 4ece1b52..a898ecc4 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -1573,7 +1573,7 @@ impl<T: EventListener> Handler for Term<T> { ansi::Mode::LineWrap => self.mode.insert(TermMode::LINE_WRAP), ansi::Mode::LineFeedNewLine => self.mode.insert(TermMode::LINE_FEED_NEW_LINE), ansi::Mode::Origin => self.mode.insert(TermMode::ORIGIN), - ansi::Mode::DECCOLM => self.deccolm(), + ansi::Mode::ColumnMode => self.deccolm(), ansi::Mode::Insert => self.mode.insert(TermMode::INSERT), ansi::Mode::BlinkingCursor => { let style = self.cursor_style.get_or_insert(self.default_cursor_style); @@ -1615,7 +1615,7 @@ impl<T: EventListener> Handler for Term<T> { ansi::Mode::LineWrap => self.mode.remove(TermMode::LINE_WRAP), ansi::Mode::LineFeedNewLine => self.mode.remove(TermMode::LINE_FEED_NEW_LINE), ansi::Mode::Origin => self.mode.remove(TermMode::ORIGIN), - ansi::Mode::DECCOLM => self.deccolm(), + ansi::Mode::ColumnMode => self.deccolm(), ansi::Mode::Insert => self.mode.remove(TermMode::INSERT), ansi::Mode::BlinkingCursor => { let style = self.cursor_style.get_or_insert(self.default_cursor_style); |