summaryrefslogtreecommitdiff
path: root/src/metadata.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-08-07 15:02:43 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-09-04 13:23:37 +0100
commitaa06f2658bdc2af1d3561fff32faa17191d1eb6e (patch)
tree56dc90a1de27d9b0e372ded69bbf93a0a1460d5a /src/metadata.rs
parent4e7e22eeb0622186b3fd470fe3872e4c423a1933 (diff)
downloadsubplot-aa06f2658bdc2af1d3561fff32faa17191d1eb6e.tar.gz
chore: Fix unnecessary borrow lints
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/metadata.rs')
-rw-r--r--src/metadata.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/metadata.rs b/src/metadata.rs
index 8406e38..c598bb0 100644
--- a/src/metadata.rs
+++ b/src/metadata.rs
@@ -158,7 +158,7 @@ fn get_string(map: &Mapp, field: &str) -> Option<String> {
};
let v = match v {
pandoc_ast::MetaValue::MetaString(s) => s.to_string(),
- pandoc_ast::MetaValue::MetaInlines(vec) => join(&vec),
+ pandoc_ast::MetaValue::MetaInlines(vec) => join(vec),
_ => panic!("don't know how to handle: {:?}", v),
};
Some(v)
@@ -195,7 +195,7 @@ fn get_classes(map: &Mapp) -> Vec<String> {
fn push_strings(v: &MetaValue, strings: &mut Vec<String>) {
match v {
MetaValue::MetaString(s) => strings.push(s.to_string()),
- MetaValue::MetaInlines(vec) => strings.push(join(&vec)),
+ MetaValue::MetaInlines(vec) => strings.push(join(vec)),
MetaValue::MetaList(values) => {
for value in values {
push_strings(value, strings);
@@ -211,7 +211,7 @@ where
{
match v {
MetaValue::MetaString(s) => bufs.push(basedir.as_ref().join(Path::new(s))),
- MetaValue::MetaInlines(vec) => bufs.push(basedir.as_ref().join(Path::new(&join(&vec)))),
+ MetaValue::MetaInlines(vec) => bufs.push(basedir.as_ref().join(Path::new(&join(vec)))),
MetaValue::MetaList(values) => {
for value in values {
push_pathbufs(basedir.as_ref(), value, bufs);
@@ -230,7 +230,7 @@ fn join(vec: &[Inline]) -> String {
fn join_into_buffer(vec: &[Inline], buf: &mut String) {
for item in vec {
match item {
- pandoc_ast::Inline::Str(s) => buf.push_str(&s),
+ pandoc_ast::Inline::Str(s) => buf.push_str(s),
pandoc_ast::Inline::Emph(v) => join_into_buffer(v, buf),
pandoc_ast::Inline::Strong(v) => join_into_buffer(v, buf),
pandoc_ast::Inline::Strikeout(v) => join_into_buffer(v, buf),