mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-03-13 12:10:44 +01:00
from -> impl_from
This commit is contained in:
parent
c1b727bafc
commit
d1c08df535
2 changed files with 6 additions and 6 deletions
2
dizzle
2
dizzle
|
|
@ -1 +1 @@
|
||||||
Subproject commit 909b94cbd4beffb49be314724dc79db9374bcc99
|
Subproject commit a06838f22a400a296c92db8c9cec18b8c3ec5e1f
|
||||||
|
|
@ -868,11 +868,11 @@ mod xywh {
|
||||||
use unicode_width::{UnicodeWidthStr, UnicodeWidthChar};
|
use unicode_width::{UnicodeWidthStr, UnicodeWidthChar};
|
||||||
use rand::distributions::uniform::UniformSampler;
|
use rand::distributions::uniform::UniformSampler;
|
||||||
impl Coord for u16 { fn plus (self, other: Self) -> Self { self.saturating_add(other) } }
|
impl Coord for u16 { fn plus (self, other: Self) -> Self { self.saturating_add(other) } }
|
||||||
from!(BigBuffer: |size:(usize, usize)| Self::new(size.0, size.1));
|
impl_from!(BigBuffer: |size:(usize, usize)| Self::new(size.0, size.1));
|
||||||
from!(ItemTheme: |base: ItemColor| Self::from_item_color(base));
|
impl_from!(ItemTheme: |base: ItemColor| Self::from_item_color(base));
|
||||||
from!(ItemTheme: |base: Color| Self::from_tui_color(base));
|
impl_from!(ItemTheme: |base: Color| Self::from_tui_color(base));
|
||||||
from!(ItemColor: |rgb: Color| Self { rgb, okhsl: rgb_to_okhsl(rgb) });
|
impl_from!(ItemColor: |rgb: Color| Self { rgb, okhsl: rgb_to_okhsl(rgb) });
|
||||||
from!(ItemColor: |okhsl: Okhsl<f32>| Self { okhsl, rgb: okhsl_to_rgb(okhsl) });
|
impl_from!(ItemColor: |okhsl: Okhsl<f32>| Self { okhsl, rgb: okhsl_to_rgb(okhsl) });
|
||||||
impl_debug!(BigBuffer |self, f| { write!(f, "[BB {}x{} ({})]", self.width, self.height, self.content.len()) });
|
impl_debug!(BigBuffer |self, f| { write!(f, "[BB {}x{} ({})]", self.width, self.height, self.content.len()) });
|
||||||
impl Tui {
|
impl Tui {
|
||||||
pub fn new (output: Box<dyn Write + Send + Sync>) -> Usually<Self> {
|
pub fn new (output: Box<dyn Write + Send + Sync>) -> Usually<Self> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue