summaryrefslogtreecommitdiff
path: root/src/export/pdf/image.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-20 14:14:13 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-20 14:21:59 +0100
commitb73b4f33bcf0e4ff2cfa8438433205cd3a323e43 (patch)
treeb59ee2c6f46558b7e6a0b2b50e0f7e93afeb3ace /src/export/pdf/image.rs
parentdd331f007cb9c9968605f8d3eaef8fb498c21322 (diff)
Fix a few clippy lints
Diffstat (limited to 'src/export/pdf/image.rs')
-rw-r--r--src/export/pdf/image.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/export/pdf/image.rs b/src/export/pdf/image.rs
index 78731734..906737de 100644
--- a/src/export/pdf/image.rs
+++ b/src/export/pdf/image.rs
@@ -20,7 +20,7 @@ pub fn write_images(ctx: &mut PdfContext) {
match image.decode().unwrap().as_ref() {
DecodedImage::Raster(dynamic, format) => {
// TODO: Error if image could not be encoded.
- let (data, filter, has_color) = encode_image(*format, &dynamic).unwrap();
+ let (data, filter, has_color) = encode_image(*format, dynamic).unwrap();
let mut image = ctx.writer.image_xobject(image_ref, &data);
image.filter(filter);
image.width(width as i32);
@@ -37,7 +37,7 @@ pub fn write_images(ctx: &mut PdfContext) {
// Add a second gray-scale image containing the alpha values if
// this image has an alpha channel.
if dynamic.color().has_alpha() {
- let (alpha_data, alpha_filter) = encode_alpha(&dynamic);
+ let (alpha_data, alpha_filter) = encode_alpha(dynamic);
let mask_ref = ctx.alloc.bump();
image.s_mask(mask_ref);
image.finish();
@@ -52,7 +52,7 @@ pub fn write_images(ctx: &mut PdfContext) {
}
DecodedImage::Svg(svg) => {
let next_ref = svg2pdf::convert_tree_into(
- &svg,
+ svg,
svg2pdf::Options::default(),
&mut ctx.writer,
image_ref,