Fix warnings for Rust 1.51 (#3214)

* Fix warnings for Rust 1.51

* More fixes

* More fixes
This commit is contained in:
Jonathan Turner
2021-03-26 21:26:57 +13:00
committed by GitHub
parent 589fc0b8ad
commit 7e184b58b2
55 changed files with 325 additions and 400 deletions

View File

@ -63,7 +63,7 @@ impl RenderContext {
Some(c) => {
print!(
"{}",
nu_ansi_term::Color::RGB(c.0, c.1, c.2)
nu_ansi_term::Color::Rgb(c.0, c.1, c.2)
.paint((0..prev_count).map(|_| "").collect::<String>())
);
prev_color = Some(*pixel);
@ -80,7 +80,7 @@ impl RenderContext {
if let Some(color) = prev_color {
print!(
"{}",
nu_ansi_term::Color::RGB(color.0, color.1, color.2)
nu_ansi_term::Color::Rgb(color.0, color.1, color.2)
.paint((0..prev_count).map(|_| "").collect::<String>())
);
}
@ -108,8 +108,8 @@ impl RenderContext {
(Some(c), Some(d)) => {
print!(
"{}",
nu_ansi_term::Color::RGB(c.0, c.1, c.2)
.on(nu_ansi_term::Color::RGB(d.0, d.1, d.2,))
nu_ansi_term::Color::Rgb(c.0, c.1, c.2)
.on(nu_ansi_term::Color::Rgb(d.0, d.1, d.2,))
.paint((0..prev_count).map(|_| "").collect::<String>())
);
prev_fg = Some(top_pixel);
@ -131,8 +131,8 @@ impl RenderContext {
if let (Some(c), Some(d)) = (prev_fg, prev_bg) {
print!(
"{}",
nu_ansi_term::Color::RGB(c.0, c.1, c.2)
.on(nu_ansi_term::Color::RGB(d.0, d.1, d.2,))
nu_ansi_term::Color::Rgb(c.0, c.1, c.2)
.on(nu_ansi_term::Color::Rgb(d.0, d.1, d.2,))
.paint((0..prev_count).map(|_| "").collect::<String>())
);
}