Skip to content

Commit

Permalink
Replace term with termcolor
Browse files Browse the repository at this point in the history
  • Loading branch information
aloucks committed Jun 9, 2021
1 parent 2d37670 commit 1aaf24d
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 238 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ no-self-update = []
# Sorted by alphabetic order
[dependencies]
anyhow = "1.0.31"
atty = "0.2"
cfg-if = "1.0"
chrono = "0.4"
clap = "2"
Expand Down Expand Up @@ -57,8 +58,7 @@ sharded-slab = "0.1.1"
strsim = "0.10"
tar = "0.4.26"
tempfile = "3.1"
# FIXME(issue #1818, #1826, and friends)
term = "=0.5.1"
termcolor = "1.1"
thiserror = "1.0"
threadpool = "1"
toml = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion src/cli/download_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt;
use std::io::Write;
use std::time::{Duration, Instant};

use term::Terminal;
use term2::Terminal;

use super::term2;
use crate::dist::Notification as In;
Expand Down
5 changes: 2 additions & 3 deletions src/cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ use clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, Shell, SubCommand};

use super::help::*;
use super::self_update;
use super::term2;
use super::term2::Terminal;
use super::term2::{self, Terminal};
use super::topical_doc;
use super::{
common,
Expand Down Expand Up @@ -1196,7 +1195,7 @@ fn show(cfg: &Cfg) -> Result<utils::ExitCode> {

fn print_header<E>(t: &mut term2::StdoutTerminal, s: &str) -> std::result::Result<(), E>
where
E: From<term::Error> + From<std::io::Error>,
E: From<std::io::Error>,
{
t.attr(term2::Attr::Bold)?;
writeln!(t, "{}", s)?;
Expand Down
Loading

0 comments on commit 1aaf24d

Please sign in to comment.