mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
fix warnings; 27.2% cov
This commit is contained in:
parent
5352a9d548
commit
d5a304e645
5 changed files with 19 additions and 9 deletions
|
|
@ -53,9 +53,18 @@ impl<'a, E: Output> Content<E> for RenderBox<'a, E> {
|
|||
pub type RenderDyn<'a, E> = dyn Render<E> + Send + Sync + 'a;
|
||||
/// You can render from an opaque pointer.
|
||||
impl<'a, E: Output> Content<E> for &RenderDyn<'a, E> where Self: Sized {
|
||||
fn content (&self) -> impl Render<E> { self.deref() }
|
||||
fn layout (&self, area: E::Area) -> E::Area { Render::layout(self.deref(), area) }
|
||||
fn render (&self, output: &mut E) { Render::render(self.deref(), output) }
|
||||
fn content (&self) -> impl Render<E> {
|
||||
#[allow(suspicious_double_ref_op)]
|
||||
self.deref()
|
||||
}
|
||||
fn layout (&self, area: E::Area) -> E::Area {
|
||||
#[allow(suspicious_double_ref_op)]
|
||||
Render::layout(self.deref(), area)
|
||||
}
|
||||
fn render (&self, output: &mut E) {
|
||||
#[allow(suspicious_double_ref_op)]
|
||||
Render::render(self.deref(), output)
|
||||
}
|
||||
}
|
||||
/// Composable renderable with static dispatch.
|
||||
pub trait Content<E: Output> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue