diff options
Diffstat (limited to 'src/library')
| -rw-r--r-- | src/library/insert.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/insert.rs b/src/library/insert.rs index b2cdc255..c196ce9e 100644 --- a/src/library/insert.rs +++ b/src/library/insert.rs @@ -27,11 +27,11 @@ pub fn image(mut args: Args, ctx: &mut EvalContext) -> Value { .and_then(|reader| reader.decode().ok()) }); - if let Some((resource, buf)) = loaded { + if let Some((res, buf)) = loaded { let dimensions = buf.dimensions(); drop(env); ctx.push(Image { - resource, + res, dimensions, width, height, @@ -50,7 +50,7 @@ pub fn image(mut args: Args, ctx: &mut EvalContext) -> Value { #[derive(Debug, Clone, PartialEq)] struct Image { /// The resource id of the image file. - resource: ResourceId, + res: ResourceId, /// The pixel dimensions of the image. dimensions: (u32, u32), /// The fixed width, if any. @@ -87,7 +87,7 @@ impl Layout for Image { let mut boxed = BoxLayout::new(size); boxed.push( Point::ZERO, - LayoutElement::Image(ImageElement { resource: self.resource, size }), + LayoutElement::Image(ImageElement { res: self.res, size }), ); Layouted::Layout(boxed, self.align) |
