diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-26 17:11:08 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-26 17:14:11 +0200 |
| commit | 5c534fb42881b508175dd25129f62e604bdae403 (patch) | |
| tree | fab522708f55d3ee132cb7a0789de701b795d847 /src/layout/image.rs | |
| parent | fb0cd3df6e1e1077c6f19c319726c9aa9678325b (diff) | |
Simplify node construction
Diffstat (limited to 'src/layout/image.rs')
| -rw-r--r-- | src/layout/image.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/layout/image.rs b/src/layout/image.rs index 59b4c6ef..b410895b 100644 --- a/src/layout/image.rs +++ b/src/layout/image.rs @@ -2,8 +2,7 @@ use super::*; use crate::image::ImageId; /// An image node. -#[derive(Debug)] -#[cfg_attr(feature = "layout-cache", derive(Hash))] +#[derive(Debug, Hash)] pub struct ImageNode { /// The id of the image file. pub id: ImageId, @@ -43,9 +42,3 @@ impl InlineLevel for ImageNode { frame } } - -impl From<ImageNode> for InlineNode { - fn from(node: ImageNode) -> Self { - Self::new(node) - } -} |
