diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2022-12-19 10:36:48 +0100 |
---|---|---|
committer | Jeff Vander Stoep <jeffv@google.com> | 2022-12-19 10:42:43 +0100 |
commit | f3fed425c01d0c9071f3fae88349c433f9d395ed (patch) | |
tree | 44ee0e3dd609641ef5bc42228f9d67d99b488436 | |
parent | c071ea4e6e9293884773ee87e93bee6ad3096438 (diff) | |
download | termcolor-f3fed425c01d0c9071f3fae88349c433f9d395ed.tar.gz |
Upgrade termcolor to 1.1.3main-16k-with-phones
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
Test: TreeHugger
Change-Id: I8d11de951e17cdc5366e6c8484e46a8bd0dab89c
-rw-r--r-- | .cargo_vcs_info.json | 7 | ||||
-rw-r--r-- | Android.bp | 8 | ||||
-rw-r--r-- | Cargo.toml | 30 | ||||
-rw-r--r-- | Cargo.toml.orig | 2 | ||||
-rw-r--r-- | METADATA | 12 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/lib.rs | 16 |
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 @@ -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, @@ -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. @@ -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 } } @@ -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: @@ -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 |