rust: update to new set_{fg,bg}_rgb()

This commit is contained in:
nick black 2021-07-25 09:34:31 -04:00
parent 1e99a2a202
commit 7e74d96792
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -309,7 +309,7 @@ impl NcPlane {
pub fn set_fg_rgb8(&mut self, red: NcComponent, green: NcComponent, blue: NcComponent) { pub fn set_fg_rgb8(&mut self, red: NcComponent, green: NcComponent, blue: NcComponent) {
unsafe { unsafe {
// Can't fail because of type enforcing. // Can't fail because of type enforcing.
let _ = crate::ncplane_set_fg_rgb8(self, red as i32, green as i32, blue as i32); let _ = crate::ncplane_set_fg_rgb8(self, red as u32, green as u32, blue as u32);
} }
} }
@ -326,7 +326,7 @@ impl NcPlane {
pub fn set_bg_rgb8(&mut self, red: NcComponent, green: NcComponent, blue: NcComponent) { pub fn set_bg_rgb8(&mut self, red: NcComponent, green: NcComponent, blue: NcComponent) {
unsafe { unsafe {
// Can't fail because of type enforcing. // Can't fail because of type enforcing.
let _ = crate::ncplane_set_bg_rgb8(self, red as i32, green as i32, blue as i32); let _ = crate::ncplane_set_bg_rgb8(self, red as u32, green as u32, blue as u32);
} }
} }