fix warnings; 27.2% cov

This commit is contained in:
🪞👃🪞 2025-03-04 01:03:13 +02:00
parent 5352a9d548
commit d5a304e645
5 changed files with 19 additions and 9 deletions

View file

@ -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> {