small change to image resizing

This commit is contained in:
djaidjai committed 2023-02-08 19:08:59 +01:00
1 parent 5f01bfa485
commit 7d33d72401
5 files changed
+16 -32

No files matched your search

+4 -20
View File
@@ -1,29 +1,13 @@
pub struct RGB {
pub r: u8,
pub g: u8,
pub b: u8,
}
pub struct Ascii {
pub char: char,
pub rgb: RGB,
pub rgb: [u8; 3],
}
impl Ascii {
fn _new(char: char, r: u8, g: u8, b: u8) -> Self {
pub fn new(ch: u8, r: u8, g: u8, b: u8) -> Self {
Ascii {
char,
rgb: RGB {
r,
g,
b,
},
char: char::from(ch),
rgb: [r, g, b],
}
}
pub fn new(ch: u8, r: u8, g: u8, b: u8) -> Self {
Self::_new(char::from(ch), r, g, b)
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.