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

View file

@ -88,7 +88,7 @@
{% raw %} {% raw %}
& \widel{\large\title{% & \widel{\large\title{%
{% endraw %} {% endraw %}
{{ experience.title }}}\hint{ {{experience.company }} }} & {{ experience.start }}---{{ experience.end }}\\ {{ experience.title }}}\hint{ {{experience.company }} }} & {{ experience.start }}---{{ experience.end }} \\
& \widel{\footnotesize {{ experience.location }}} \\ & \widel{\footnotesize {{ experience.location }}} \\
{% for note in experience.notes -%} {% for note in experience.notes -%}
& \bullet & \bullet