diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-05-01 20:20:19 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-05-01 20:20:19 +0300 |
commit | e556bea8566449ab96054a77b5298e9d112027c6 (patch) | |
tree | 87f096c90180251c8240c6485397e6f4610bb018 | |
parent | d6cb7a6600213b0a63899a471333436b2661b248 (diff) | |
download | subplot-e556bea8566449ab96054a77b5298e9d112027c6.tar.gz |
Fix: nits found by cargo clippy
-rw-r--r-- | src/ast.rs | 7 | ||||
-rw-r--r-- | src/bin/sp-docgen.rs | 5 | ||||
-rw-r--r-- | src/bin/sp-meta.rs | 1 | ||||
-rw-r--r-- | src/bindings.rs | 1 | ||||
-rw-r--r-- | src/templatespec.rs | 1 |
5 files changed, 2 insertions, 13 deletions
@@ -13,8 +13,6 @@ use std::collections::HashSet; use pandoc_ast::{Attr, Block, Inline, Map, MetaValue, MutVisitor, Pandoc}; use serde::{Deserialize, Serialize}; -use roadmap; - use std::path::Path; /// A parsed Subplot document. @@ -560,9 +558,8 @@ impl<'a> MutVisitor for TypesettingVisitor<'a> { // Is a code block marked as being of a given type? fn is_class(attr: &Attr, class: &str) -> bool { - match attr { - (_id, classes, _kvpairs) => classes.iter().any(|s| s == class), - } + let (_id, classes, _kvpairs) = attr; + classes.iter().any(|s| s == class) } /// Typeset an error as a Pandoc AST Block element. diff --git a/src/bin/sp-docgen.rs b/src/bin/sp-docgen.rs index 5f67ff4..b769567 100644 --- a/src/bin/sp-docgen.rs +++ b/src/bin/sp-docgen.rs @@ -1,17 +1,12 @@ use chrono::{Local, TimeZone}; -use file_diff; -use pandoc; use std::fs; use std::path::Path; use std::path::PathBuf; use std::time::UNIX_EPOCH; use structopt::StructOpt; -use tempfile; use anyhow::Result; -use subplot; - // Define the command line arguments. #[derive(Debug, StructOpt)] #[structopt(name = "docgen", about = "Subplot document generator.")] diff --git a/src/bin/sp-meta.rs b/src/bin/sp-meta.rs index b46367e..6d74a8b 100644 --- a/src/bin/sp-meta.rs +++ b/src/bin/sp-meta.rs @@ -1,7 +1,6 @@ use anyhow::Result; use std::path::PathBuf; use structopt::StructOpt; -use subplot; #[derive(Debug, StructOpt)] #[structopt(name = "sp-meta", about = "Show Subplot document metadata.")] diff --git a/src/bindings.rs b/src/bindings.rs index ae677ae..d53df23 100644 --- a/src/bindings.rs +++ b/src/bindings.rs @@ -5,7 +5,6 @@ use super::StepKind; use crate::{Result, SubplotError}; use serde::Deserialize; -use serde_yaml; use std::fs::File; use std::io::Read; diff --git a/src/templatespec.rs b/src/templatespec.rs index 77191a6..dc85f1d 100644 --- a/src/templatespec.rs +++ b/src/templatespec.rs @@ -2,7 +2,6 @@ use crate::Result; use crate::SubplotError; use serde::Deserialize; -use serde_yaml; use std::fs::File; use std::io::Read; |