Skip to content

Commit

Permalink
run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli Flanagan authored and eflanagan0 committed Sep 12, 2019
1 parent da44f56 commit dd62951
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/bin/tectonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ fn main() {
// something I'd be relatively OK with since it'd only affect the progam
// UI, not the processing results).

let mut status = TermcolorStatusBackend::new(ChatterLevel::from_str(&args.chatter_level).unwrap());
let mut status =
TermcolorStatusBackend::new(ChatterLevel::from_str(&args.chatter_level).unwrap());

// For now ...

Expand Down
8 changes: 3 additions & 5 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ use std::str::FromStr;
use crate::digest::DigestData;
use crate::engines::IoEventBackend;
use crate::errors::{ErrorKind, Result, ResultExt};
use std::result::Result as StdResult;
use crate::io::{Bundle, InputOrigin, IoProvider, IoSetup, IoSetupBuilder, OpenResult};
use crate::status::StatusBackend;
use crate::{ctry, errmsg, tt_error, tt_note, tt_warning};
use crate::{BibtexEngine, Spx2HtmlEngine, TexEngine, TexResult, XdvipdfmxEngine};
use std::result::Result as StdResult;

/// Different patterns with which files may have been accessed by the
/// underlying engines. Once a file is marked as ReadThenWritten or
Expand Down Expand Up @@ -222,7 +222,7 @@ impl FromStr for OutputFormat {
"xdv" => OutputFormat::Xdv,
"pdf" => OutputFormat::Pdf,
"fmt" => OutputFormat::Format,
_ => unreachable!()
_ => unreachable!(),
};

Ok(actual)
Expand Down Expand Up @@ -254,16 +254,14 @@ impl Default for PassSetting {
}

impl FromStr for PassSetting {

type Err = &'static str;

fn from_str(a_str: &str) -> StdResult<Self, Self::Err> {

let actual = match a_str {
"default" => PassSetting::Default,
"bibtex_first" => PassSetting::BibtexFirst,
"tex" => PassSetting::Tex,
_ => unreachable!()
_ => unreachable!(),
};

Ok(actual)
Expand Down
6 changes: 2 additions & 4 deletions src/status/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pub mod termcolor;

use std::cmp;
use std::fmt::Arguments;
use std::str::FromStr;
use std::result::Result as StdResult;
use std::str::FromStr;

use crate::errors::Error;

Expand All @@ -21,15 +21,13 @@ pub enum ChatterLevel {
}

impl FromStr for ChatterLevel {

type Err = &'static str;

fn from_str(a_str: &str) -> StdResult<Self, Self::Err> {

let actual = match a_str {
"default" => ChatterLevel::Normal,
"minimal" => ChatterLevel::Minimal,
_ => unreachable!()
_ => unreachable!(),
};

Ok(actual)
Expand Down

0 comments on commit dd62951

Please sign in to comment.