ran clippy

This commit is contained in:
Edward Shen 2019-12-03 19:35:36 -05:00
parent d2cdc427a3
commit fb18c0f340
Signed by: edward
GPG key ID: F350507060ED6C90
2 changed files with 6 additions and 6 deletions

View file

@ -13,8 +13,8 @@ use std::{
};
use tera::{Context, Error as TeraError, Tera};
const DEFAULT_TEMPLATE_DIR: &'static str = "templates";
const DEFAULT_OUTPUT_DIR: &'static str = "output";
const DEFAULT_TEMPLATE_DIR: &str = "templates";
const DEFAULT_OUTPUT_DIR: &str = "output";
fn main() -> Result<(), Box<dyn Error>> {
process::exit(match run() {
@ -43,7 +43,7 @@ fn run() -> Result<(), Box<dyn Error>> {
let outputs: Vec<String> = matches
.values_of("output-format")
.unwrap_or_default()
.map(|e| String::from(e))
.map(String::from)
.collect();
if matches.is_present("watch") {
@ -76,7 +76,7 @@ fn watch_mode<'a>(
engine: &mut Tera,
context: &mut Context,
dir: &str,
outputs: &Vec<String>,
outputs: &[String],
template_dir: &'a str,
) -> Result<(), Box<dyn Error>> {
let (tx, rx) = unbounded();
@ -101,7 +101,7 @@ fn output<'a>(
engine: &Tera,
context: &Context,
dir: &str,
outputs: &Vec<String>,
outputs: &[String],
template_dir: &'a str,
) -> Result<(), Box<dyn Error>> {
if outputs.contains(&String::from("all")) {