From 41c581e2f05c49fd87136ab2e86d87a809448f0f Mon Sep 17 00:00:00 2001 From: Michal Date: Sun, 24 Jul 2022 16:21:47 +0100 Subject: [PATCH] FMT + consistent formatting --- src/main.rs | 4 ++-- src/operations/info.rs | 6 ++++-- src/repository/config.rs | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index f4eb576..193fd4d 100755 --- a/src/main.rs +++ b/src/main.rs @@ -70,8 +70,8 @@ fn main() { "Cannot prune packages in workspace mode" ); } - operations::prune(verbose) - }, + operations::prune(verbose); + } Operation::Clean => operations::clean(verbose), Operation::Info => operations::info(verbose), } diff --git a/src/operations/info.rs b/src/operations/info.rs index 91aeac9..eebac49 100644 --- a/src/operations/info.rs +++ b/src/operations/info.rs @@ -1,9 +1,10 @@ -use crate::{crash, info, internal::AppExitCode, log}; use colored::Colorize; use std::env; use std::process::Command; use tabled::Tabled; +use crate::{crash, info, internal::AppExitCode, log}; + // For displaying the table of contents #[derive(Clone, tabled::Tabled, Debug)] struct RepoDisplayGit { @@ -53,7 +54,8 @@ pub fn git_status(verbose: bool, repo: &str, colorblind: bool) -> String { let output = String::from_utf8(output.stdout).unwrap(); log!(verbose, "Git status: {}", output); - let unstaged = output.contains("Changes not staged for commit") || output.contains("Changes to be committed"); + let unstaged = output.contains("Changes not staged for commit") + || output.contains("Changes to be committed"); let untracked = output.contains("Untracked files"); let dirty = unstaged || untracked; diff --git a/src/repository/config.rs b/src/repository/config.rs index 08b7150..c432dd5 100644 --- a/src/repository/config.rs +++ b/src/repository/config.rs @@ -38,6 +38,7 @@ repos = [ crs = "https://github.com/crystal-linux/{}" aur = "https://aur.archlinux.org/{}" "#; + pub fn create(verbose: bool) { // Ensure current directory is empty if env::current_dir()