Skip to content

Commit c2b5422

Browse files
Ditch non-functional things
1 parent 896469a commit c2b5422

File tree

7 files changed

+23
-141
lines changed

7 files changed

+23
-141
lines changed

src/blink.rs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/bold.rs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/colors.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,23 @@ impl Rgb {
1717
}
1818
}
1919

20+
impl Default for Rgb {
21+
fn default() -> Self {
22+
Rgb::new(0, 0, 0)
23+
}
24+
}
25+
2026
pub struct Colors();
2127

2228
impl Colors {
29+
pub fn white() -> Rgb {
30+
Rgb::new(255, 255, 255)
31+
}
32+
33+
pub fn black() -> Rgb {
34+
Default::default()
35+
}
36+
2337
pub fn red() -> Rgb {
2438
Rgb::new(255, 0, 0)
2539
}

src/italic.rs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
#![no_std]
22

33
mod background;
4-
mod blink;
5-
mod bold;
64
mod colors;
75
mod foreground;
8-
mod italic;
9-
mod underline;
106

117
pub use background::*;
12-
pub use blink::*;
13-
pub use bold::*;
148
pub use colors::*;
15-
pub use foreground::*;
16-
pub use italic::*;
17-
pub use underline::*;
9+
pub use foreground::*;

src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ pub use colored::*;
22

33
fn main() {
44
println!("{}, {}, {}, {}, {}, {}, {}, {}",
5-
"Red".foreground(Colors::red()),
6-
"Orange".foreground(Colors::orange()).italic(),
7-
"Yellow".foreground(Colors::yellow()),
8-
"Green".foreground(Colors::green()).underline(),
9-
"Cyan".foreground(Colors::cyan()),
10-
"Blue".foreground(Colors::blue()).bold(),
11-
"Purple".foreground(Colors::purple()),
12-
"Violet".foreground(Colors::violet()).blink()
5+
"Red".foreground(Colors::black()).background(Colors::red()),
6+
"Orange".foreground(Colors::black()).background(Colors::orange()),
7+
"Yellow".foreground(Colors::black()).background(Colors::yellow()),
8+
"Green".foreground(Colors::black()).background(Colors::green()),
9+
"Cyan".foreground(Colors::black()).background(Colors::cyan()),
10+
"Blue".foreground(Colors::white()).background(Colors::blue()),
11+
"Purple".foreground(Colors::white()).background(Colors::purple()),
12+
"Violet".foreground(Colors::white()).background(Colors::violet())
1313
);
1414
}

src/underline.rs

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)