@@ -109,11 +109,13 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult<Clog> {
109
109
let mut clog = if let Some ( cfg) = matches. value_of ( "config" ) {
110
110
debugln ! ( "User passed in config file: {:?}" , cfg) ;
111
111
if matches. is_present ( "workdir" ) && matches. is_present ( "gitdir" ) {
112
- debugln ! ( "User passed in both\n \t working dir: {:?}\n \t git dir: {:?}" , matches. value_of( "workdir" ) , matches. value_of( "gitdir" ) ) ;
112
+ debugln ! ( "User passed in both\n \t working dir: {:?}\n \t git dir: {:?}" ,
113
+ matches. value_of( "workdir" ) ,
114
+ matches. value_of( "gitdir" ) ) ;
113
115
// use --config --work-tree --git-dir
114
116
try!( Clog :: with_all ( matches. value_of ( "gitdir" ) . unwrap ( ) ,
115
- matches. value_of ( "workdir" ) . unwrap ( ) ,
116
- cfg) )
117
+ matches. value_of ( "workdir" ) . unwrap ( ) ,
118
+ cfg) )
117
119
} else if let Some ( dir) = matches. value_of ( "workdir" ) {
118
120
debugln ! ( "User passed in working dir: {:?}" , dir) ;
119
121
// use --config --work-tree
@@ -132,7 +134,9 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult<Clog> {
132
134
if matches. is_present ( "gitdir" ) && matches. is_present ( "workdir" ) {
133
135
let wdir = matches. value_of ( "workdir" ) . unwrap ( ) ;
134
136
let gdir = matches. value_of ( "gitdir" ) . unwrap ( ) ;
135
- debugln ! ( "User passed in both\n \t working dir: {:?}\n \t git dir: {:?}" , wdir, gdir) ;
137
+ debugln ! ( "User passed in both\n \t working dir: {:?}\n \t git dir: {:?}" ,
138
+ wdir,
139
+ gdir) ;
136
140
try!( Clog :: with_dirs ( gdir, wdir) )
137
141
} else if let Some ( dir) = matches. value_of ( "gitdir" ) {
138
142
debugln ! ( "User passed in git dir: {:?}" , dir) ;
@@ -183,10 +187,19 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult<Clog> {
183
187
}
184
188
_ => unreachable ! ( ) ,
185
189
}
186
- format ! ( "{}{}" , if had_v{ "v" } else{ "" } , v)
190
+ format ! ( "{}{}" ,
191
+ if had_v {
192
+ "v"
193
+ } else {
194
+ ""
195
+ } ,
196
+ v)
187
197
}
188
198
Err ( e) => {
189
- return Err ( CliError :: Semver ( Box :: new ( e) , String :: from ( "Failed to parse version into valid SemVer. Ensure the version is in the X.Y.Z format." ) ) ) ;
199
+ return Err ( CliError :: Semver ( Box :: new ( e) ,
200
+ String :: from ( "Failed to parse version into \
201
+ valid SemVer. Ensure the version \
202
+ is in the X.Y.Z format.") ) ) ;
190
203
}
191
204
}
192
205
} else {
@@ -205,8 +218,8 @@ pub fn from_matches(matches: &ArgMatches) -> CliResult<Clog> {
205
218
}
206
219
207
220
if matches. is_present ( "link-style" ) {
208
- clog. link_style =
209
- value_t ! ( matches . value_of ( "link-style" ) , LinkStyle ) . unwrap_or ( LinkStyle :: Github ) ;
221
+ clog. link_style = value_t ! ( matches . value_of ( "link-style" ) , LinkStyle )
222
+ . unwrap_or ( LinkStyle :: Github ) ;
210
223
}
211
224
212
225
if let Some ( subtitle) = matches. value_of ( "subtitle" ) {
0 commit comments