File tree 3 files changed +5
-15
lines changed
3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ fn run() -> Result<()> {
16
16
let _ = ansi_term:: enable_ansi_support ( ) ;
17
17
18
18
if !is_git_installed ( ) {
19
- return Err ( "Git failed to execute!" . into ( ) ) ;
19
+ return Err ( "git failed to execute!" . into ( ) ) ;
20
20
}
21
21
22
22
let config = Cli :: new ( ) ?;
Original file line number Diff line number Diff line change @@ -65,22 +65,13 @@ impl std::fmt::Display for Token {
65
65
}
66
66
impl Token {
67
67
fn is_solid ( & self ) -> bool {
68
- match * self {
69
- Token :: Char ( _) => true ,
70
- _ => false ,
71
- }
68
+ matches ! ( * self , Token :: Char ( _) )
72
69
}
73
70
fn is_space ( & self ) -> bool {
74
- match * self {
75
- Token :: Space => true ,
76
- _ => false ,
77
- }
71
+ matches ! ( * self , Token :: Space )
78
72
}
79
73
fn has_zero_width ( & self ) -> bool {
80
- match * self {
81
- Token :: Color ( _) => true ,
82
- _ => false ,
83
- }
74
+ matches ! ( * self , Token :: Color ( _) )
84
75
}
85
76
}
86
77
Original file line number Diff line number Diff line change @@ -88,8 +88,7 @@ impl<W: Write> Printer<W> {
88
88
}
89
89
90
90
pub fn is_valid_repo ( repo_path : & str ) -> Result < bool > {
91
- let repo =
92
- Repository :: open_ext ( repo_path, RepositoryOpenFlags :: empty ( ) , Vec :: < & Path > :: new ( ) ) ;
91
+ let repo = Repository :: open_ext ( repo_path, RepositoryOpenFlags :: empty ( ) , Vec :: < & Path > :: new ( ) ) ;
93
92
94
93
Ok ( repo. is_ok ( ) && !repo?. is_bare ( ) )
95
94
}
You can’t perform that action at this time.
0 commit comments