diff options
author | Lars Wirzenius <liw@liw.fi> | 2024-03-10 07:21:41 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2024-03-10 07:21:41 +0200 |
commit | 92ed3266d1a4d97c49cbffb1cfb9c9a62f48c7bc (patch) | |
tree | c7308d3340b59b77289403caf58fe0df42b61fe3 | |
parent | 204db1f37987c1a359ea6034abac3688768fac9d (diff) | |
download | pandoc-filter-diagram-92ed3266d1a4d97c49cbffb1cfb9c9a62f48c7bc.tar.gz |
fix: drop unnecessary conversion to string
Found by clippy.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
-rw-r--r-- | src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -216,7 +216,7 @@ impl DiagramFilter { } fn error_block(&self, error: &DiagramError) -> Block { - let msg = Inline::Str(format!("ERROR: {}", error.to_string())); + let msg = Inline::Str(format!("ERROR: {}", error)); let msg = vec![Inline::Strong(vec![msg])]; Block::Para(msg) } @@ -229,7 +229,7 @@ impl DiagramFilter { } fn svg_as_data_url(&self, svg: &[u8]) -> String { - let svg = base64::encode(&svg); + let svg = base64::encode(svg); format!("data:image/svg+xml;base64,{}", svg) } |