Skip to content

Commit

Permalink
style: Address warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed May 2, 2024
1 parent 370cccb commit 2f1dc1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ fn main() {

fn run() -> proc_exit::ExitResult {
let mut config = Config::system();
match config.get(&crate::git2_config::COLOR_UI) {
crate::git2_config::ColorWhen::Always => anstream::ColorChoice::Always,
crate::git2_config::ColorWhen::Auto => anstream::ColorChoice::Auto,
crate::git2_config::ColorWhen::Never => anstream::ColorChoice::Never,
match config.get(&git2_config::COLOR_UI) {
git2_config::ColorWhen::Always => anstream::ColorChoice::Always,
git2_config::ColorWhen::Auto => anstream::ColorChoice::Auto,
git2_config::ColorWhen::Never => anstream::ColorChoice::Never,
}
.write_global();

Expand Down Expand Up @@ -109,7 +109,7 @@ fn list_languages(config: &mut Config) -> proc_exit::ExitResult {
.or_else(|| std::env::var_os("COLUMNS").and_then(|s| s.to_str()?.parse::<u16>().ok()))
.unwrap_or(80) as usize;

let pager = config.get(&crate::git2_config::PAGER);
let pager = config.get(&git2_config::PAGER);
let mut pager = Pager::stdout(&pager);
let mut pager = pager.start();
let pager = pager.as_writer().with_code(proc_exit::Code::FAILURE)?;
Expand Down Expand Up @@ -159,7 +159,7 @@ fn list_languages(config: &mut Config) -> proc_exit::ExitResult {
fn list_themes(config: &mut Config) -> proc_exit::ExitResult {
let colored_stdout =
anstream::AutoStream::choice(&std::io::stdout()) != anstream::ColorChoice::Never;
let pager = config.get(&crate::git2_config::PAGER);
let pager = config.get(&git2_config::PAGER);
let mut pager = Pager::stdout(&pager);
let mut pager = pager.start();
let pager = pager.as_writer().with_code(proc_exit::Code::FAILURE)?;
Expand Down

0 comments on commit 2f1dc1e

Please sign in to comment.