summaryrefslogtreecommitdiffstats
path: root/vendor/colored/examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/colored/examples
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/colored/examples')
-rw-r--r--[-rwxr-xr-x]vendor/colored/examples/control.rs1
-rw-r--r--vendor/colored/examples/custom_colors.rs6
-rw-r--r--[-rwxr-xr-x]vendor/colored/examples/dynamic_colors.rs0
-rw-r--r--[-rwxr-xr-x]vendor/colored/examples/most_simple.rs0
-rw-r--r--[-rwxr-xr-x]vendor/colored/examples/nested_colors.rs0
5 files changed, 7 insertions, 0 deletions
diff --git a/vendor/colored/examples/control.rs b/vendor/colored/examples/control.rs
index b50b42691..14a7b762c 100755..100644
--- a/vendor/colored/examples/control.rs
+++ b/vendor/colored/examples/control.rs
@@ -1,3 +1,4 @@
+#![allow(unused_must_use)]
extern crate colored;
use colored::*;
diff --git a/vendor/colored/examples/custom_colors.rs b/vendor/colored/examples/custom_colors.rs
new file mode 100644
index 000000000..05c588e60
--- /dev/null
+++ b/vendor/colored/examples/custom_colors.rs
@@ -0,0 +1,6 @@
+use colored::*;
+fn main() {
+ let my_color = CustomColor::new(0, 120, 120);
+ println!("{}", "Greetings from Ukraine".custom_color(my_color));
+ println!("{}", "Slava Ukraini!".on_custom_color(my_color));
+}
diff --git a/vendor/colored/examples/dynamic_colors.rs b/vendor/colored/examples/dynamic_colors.rs
index d9861f425..d9861f425 100755..100644
--- a/vendor/colored/examples/dynamic_colors.rs
+++ b/vendor/colored/examples/dynamic_colors.rs
diff --git a/vendor/colored/examples/most_simple.rs b/vendor/colored/examples/most_simple.rs
index b94a2b36a..b94a2b36a 100755..100644
--- a/vendor/colored/examples/most_simple.rs
+++ b/vendor/colored/examples/most_simple.rs
diff --git a/vendor/colored/examples/nested_colors.rs b/vendor/colored/examples/nested_colors.rs
index de1124916..de1124916 100755..100644
--- a/vendor/colored/examples/nested_colors.rs
+++ b/vendor/colored/examples/nested_colors.rs