tidyverse / hms

A simple class for storing time-of-day values
https://hms.tidyverse.org/
Other
138 stars 25 forks source link

fix as.hms.numeric for zero-length input #36

Closed carlganz closed 7 years ago

carlganz commented 7 years ago

Fixes #35

I'm sure there is a more elegant way to handle this, but this ensures that zero length inputs are handled consistently between numeric and character.

codecov[bot] commented 7 years ago

Codecov Report

Merging #36 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #36   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           6      6           
  Lines          71     72    +1     
=====================================
+ Hits           71     72    +1
Impacted Files Coverage Δ
R/hms.R 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a2fe26d...4dd53b5. Read the comment docs.

krlmlr commented 7 years ago

Thanks for looking into it, but I prefer a fix at a lower level.