aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2022-12-19 17:11:55 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-12-19 17:11:55 +0000
commita175688a1d5a2f15dceb449f8f03446bda90a775 (patch)
tree44ee0e3dd609641ef5bc42228f9d67d99b488436
parentfd3581760f6138a064ba8bb28e4f6d1bf3d2003d (diff)
parent7b44686ee4a2cb9a8959089e384bb011c008c5cd (diff)
downloadtermcolor-a175688a1d5a2f15dceb449f8f03446bda90a775.tar.gz
Upgrade termcolor to 1.1.3 am: f3fed425c0 am: 82767e2ee3 am: 7b44686ee4
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/termcolor/+/2362883 Change-Id: I8a5f15a79c6bc2561124d6da2674c07c7db387a5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--Android.bp8
-rw-r--r--Cargo.toml30
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA12
-rw-r--r--README.md4
-rw-r--r--src/lib.rs16
7 files changed, 56 insertions, 23 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index c0bf7bd..f7a8b76 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
{
"git": {
- "sha1": "949875368995c00bef275dc8c554f5b34bc35a05"
- }
-}
+ "sha1": "677f98b26a1b52f72303e1c9dfdc9ef68def8014"
+ },
+ "path_in_vcs": ""
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 3b59f16..d80140b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,9 +43,13 @@ rust_library {
host_supported: true,
crate_name: "termcolor",
cargo_env_compat: true,
- cargo_pkg_version: "1.1.2",
+ cargo_pkg_version: "1.1.3",
srcs: ["src/lib.rs"],
edition: "2018",
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
}
rust_test {
@@ -53,7 +57,7 @@ rust_test {
host_supported: true,
crate_name: "termcolor",
cargo_env_compat: true,
- cargo_pkg_version: "1.1.2",
+ cargo_pkg_version: "1.1.3",
srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
diff --git a/Cargo.toml b/Cargo.toml
index 344e18b..9a996a5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,24 +3,35 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
name = "termcolor"
-version = "1.1.2"
+version = "1.1.3"
authors = ["Andrew Gallant <jamslam@gmail.com>"]
-exclude = ["/.travis.yml", "/appveyor.yml", "/ci/**"]
-description = "A simple cross platform library for writing colored text to a terminal.\n"
+exclude = [
+ "/.travis.yml",
+ "/appveyor.yml",
+ "/ci/**",
+]
+description = """
+A simple cross platform library for writing colored text to a terminal.
+"""
homepage = "https://github.com/BurntSushi/termcolor"
documentation = "https://docs.rs/termcolor"
readme = "README.md"
-keywords = ["windows", "win", "color", "ansi", "console"]
+keywords = [
+ "windows",
+ "win",
+ "color",
+ "ansi",
+ "console",
+]
license = "Unlicense OR MIT"
repository = "https://github.com/BurntSushi/termcolor"
@@ -28,6 +39,5 @@ repository = "https://github.com/BurntSushi/termcolor"
name = "termcolor"
bench = false
-[dev-dependencies]
[target."cfg(windows)".dependencies.winapi-util]
version = "0.1.3"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 1e9f5d3..05dbb43 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "termcolor"
-version = "1.1.2" #:version
+version = "1.1.3" #:version
authors = ["Andrew Gallant <jamslam@gmail.com>"]
description = """
A simple cross platform library for writing colored text to a terminal.
diff --git a/METADATA b/METADATA
index eab3cf6..a166c15 100644
--- a/METADATA
+++ b/METADATA
@@ -1,3 +1,7 @@
+# This project was upgraded with external_updater.
+# Usage: tools/external_updater/updater.sh update rust/crates/termcolor
+# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
+
name: "termcolor"
description: "A simple cross platform library for writing colored text to a terminal."
third_party {
@@ -7,13 +11,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/termcolor/termcolor-1.1.2.crate"
+ value: "https://static.crates.io/crates/termcolor/termcolor-1.1.3.crate"
}
- version: "1.1.2"
+ version: "1.1.3"
license_type: NOTICE
last_upgrade_date {
- year: 2020
- month: 11
+ year: 2022
+ month: 12
day: 19
}
}
diff --git a/README.md b/README.md
index 1c91d07..646e3b5 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ applications.
[![Build status](https://github.com/BurntSushi/termcolor/workflows/ci/badge.svg)](https://github.com/BurntSushi/termcolor/actions)
[![](https://img.shields.io/crates/v/termcolor.svg)](https://crates.io/crates/termcolor)
-Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
+Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/).
### Documentation
@@ -85,7 +85,7 @@ fn write_green() -> io::Result<()> {
### Automatic color selection
When building a writer with termcolor, the caller must provide a
-[`ColorChoice`](https://docs.rs/termcolor/1.0.5/termcolor/enum.ColorChoice.html)
+[`ColorChoice`](https://docs.rs/termcolor/1.*/termcolor/enum.ColorChoice.html)
selection. When the color choice is `Auto`, termcolor will attempt to determine
whether colors should be enabled by inspecting the environment. Currently,
termcolor will inspect the `TERM` and `NO_COLOR` environment variables:
diff --git a/src/lib.rs b/src/lib.rs
index 735ce97..c93cf7b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -82,7 +82,7 @@ In many scenarios when using color, one often wants to enable colors
automatically when writing to a terminal and disable colors automatically when
writing to anything else. The typical way to achieve this in Unix environments
is via libc's
-[`isatty`](http://man7.org/linux/man-pages/man3/isatty.3.html)
+[`isatty`](https://man7.org/linux/man-pages/man3/isatty.3.html)
function.
Unfortunately, this notoriously does not work well in Windows environments. To
work around that, the currently recommended solution is to use the
@@ -1450,6 +1450,20 @@ impl<W: io::Write> Ansi<W> {
}
}
+impl WriteColor for io::Sink {
+ fn supports_color(&self) -> bool {
+ false
+ }
+
+ fn set_color(&mut self, _: &ColorSpec) -> io::Result<()> {
+ Ok(())
+ }
+
+ fn reset(&mut self) -> io::Result<()> {
+ Ok(())
+ }
+}
+
/// An in-memory buffer that provides Windows console coloring.
///
/// This doesn't actually communicate with the Windows console. Instead, it