summaryrefslogtreecommitdiff
path: root/src/templatespec.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-05-20 00:25:42 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-05-20 00:25:42 +0100
commit6bf39fdb44dcbcd29c13b71aaa22c01b4741ec51 (patch)
treed9555b2e58ba198fcd9f3128e9681ca0d5457b31 /src/templatespec.rs
parente762e23a9ac7b36c6abfc8c45d1b48407263007f (diff)
downloadsubplot-6bf39fdb44dcbcd29c13b71aaa22c01b4741ec51.tar.gz
chore: Fix a bunch of clippy lints
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/templatespec.rs')
-rw-r--r--src/templatespec.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/templatespec.rs b/src/templatespec.rs
index d2389d8..e997aad 100644
--- a/src/templatespec.rs
+++ b/src/templatespec.rs
@@ -35,10 +35,7 @@ impl TemplateSpec {
TemplateSpec {
template: basedir.to_path_buf().join(template),
helpers,
- run: match run {
- Some(x) => Some(x.to_string()),
- None => None,
- },
+ run: run.map(str::to_string),
}
}
@@ -76,10 +73,7 @@ impl TemplateSpec {
///
/// The name of the test program gets appended.
pub fn run(&self) -> Option<&str> {
- match &self.run {
- Some(run) => Some(&run),
- None => None,
- }
+ self.run.as_deref()
}
}