Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
pitkley committed May 6, 2018
1 parent 0de7cea commit 617ec34
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ impl HighlightingAssets {
let mut syntax_set: SyntaxSet = from_reader(syntax_set_file).map_err(|_| {
io::Error::new(
io::ErrorKind::Other,
format!("Could not parse cached syntax set"),
"Could not parse cached syntax set".to_owned(),
)
})?;
syntax_set.link_syntaxes();
Expand All @@ -519,7 +519,7 @@ impl HighlightingAssets {
let theme_set: ThemeSet = from_reader(theme_set_file).map_err(|_| {
io::Error::new(
io::ErrorKind::Other,
format!("Could not parse cached theme set"),
"Could not parse cached theme set".to_owned(),
)
})?;

Expand Down Expand Up @@ -679,13 +679,13 @@ fn run() -> Result<()> {
},
};

let assets =
HighlightingAssets::from_cache().unwrap_or(HighlightingAssets::from_binary());
let assets = HighlightingAssets::from_cache()
.unwrap_or_else(|_| HighlightingAssets::from_binary());

let theme = assets.theme_set.themes.get("Default").ok_or_else(|| {
io::Error::new(
io::ErrorKind::Other,
format!("Could not find 'Default' theme"),
"Could not find 'Default' theme".to_owned(),
)
})?;

Expand Down

0 comments on commit 617ec34

Please sign in to comment.