Skip to content

Commit 84ce372

Browse files
committed
libtime: strftime and strptime return type changed to Result<String, ParseError>.
`strftime` currently returns a `String`. This does not indicate that this function may return an error due to to a malformed format string. This change introduces a `ParseError` enum which indicates the type of error that occurred. The return type of `strptime` was also changed to use this new enum instead of returning `Result<String, String>`. Now, all instances where `strftime` was used need to have their return value checked to see if it were valid or not. [breaking-change]
1 parent f7fb0f5 commit 84ce372

File tree

1 file changed

+256
-203
lines changed

1 file changed

+256
-203
lines changed

0 commit comments

Comments
 (0)