@@ -136,7 +136,7 @@ pub fn describe_project(args: DescribeProjectArgs, ds: &DataStore) -> anyhow::Re
136136 let repos = ds. get_repos ( & project) ?;
137137 for repo in repos. iter ( ) {
138138 println ! ( "Repository path '{}'" , repo. path( ) . display( ) ) ;
139- if let Some ( count) = ds. get_latest_count ( & repo) ? {
139+ if let Some ( count) = ds. get_latest_count ( repo) ? {
140140 println ! ( " {} lines of code" , ds. get_total_loc( & count) ?)
141141 }
142142 }
@@ -247,7 +247,7 @@ pub fn list_projects(args: ListProjectArgs, ds: &DataStore) -> anyhow::Result<()
247247 println ! ( "{}" , project. name( ) ) ;
248248 }
249249
250- if projects. len ( ) < 1 {
250+ if projects. is_empty ( ) {
251251 println ! ( "No projects in database" ) ;
252252 }
253253
@@ -301,19 +301,19 @@ pub fn list_activities(args: ListActivityArgs, ds: &DataStore) -> anyhow::Result
301301
302302 println ! (
303303 "from {} until {}, total time {}" ,
304- local_start. format( "%I:%M%P on %A %d %B %Y" ) . to_string ( ) ,
305- local_end. format( "%I:%M%P on %A %d %B %Y" ) . to_string ( ) ,
304+ local_start. format( "%I:%M%P on %A %d %B %Y" ) ,
305+ local_end. format( "%I:%M%P on %A %d %B %Y" ) ,
306306 duration
307307 )
308308 } else {
309309 println ! (
310310 "started at {}, and is still running" ,
311- local_start. format( "%I:%M%P on %A %d %B %Y" ) . to_string ( )
311+ local_start. format( "%I:%M%P on %A %d %B %Y" )
312312 )
313313 }
314314 }
315315
316- if activities. len ( ) < 1 {
316+ if activities. is_empty ( ) {
317317 println ! ( "No activities for project {} in database" , project. name( ) ) ;
318318 }
319319
@@ -329,7 +329,7 @@ pub fn list_activitytypes(args: ListActivityTypeArgs, ds: &DataStore) -> anyhow:
329329 println ! ( "{}" , at. name( ) ) ;
330330 }
331331
332- if ats. len ( ) < 1 {
332+ if ats. is_empty ( ) {
333333 println ! ( "No activity types in database" ) ;
334334 }
335335
@@ -344,7 +344,7 @@ pub fn list_counts(args: ListCountArgs, ds: &DataStore) -> anyhow::Result<()> {
344344
345345 let repos = ds. get_repos ( & project) ?;
346346 for repo in repos. iter ( ) {
347- let counts = ds. get_counts ( & repo) ?;
347+ let counts = ds. get_counts ( repo) ?;
348348 for count in counts {
349349 if args. verbose {
350350 print ! ( "{}. " , count. id( ) ) ;
@@ -358,7 +358,7 @@ pub fn list_counts(args: ListCountArgs, ds: &DataStore) -> anyhow::Result<()> {
358358 }
359359 }
360360
361- if repos. len ( ) < 1 {
361+ if repos. is_empty ( ) {
362362 println ! ( "No repositories for project {} in database" , project. name( ) ) ;
363363 }
364364
@@ -379,7 +379,7 @@ pub fn list_repos(args: ListRepoArgs, ds: &DataStore) -> anyhow::Result<()> {
379379 println ! ( "{}" , repo. path( ) . display( ) ) ;
380380 }
381381
382- if repos. len ( ) < 1 {
382+ if repos. is_empty ( ) {
383383 println ! ( "No repositories for project {} in database" , project. name( ) ) ;
384384 }
385385
0 commit comments