Skip to content

Commit

Permalink
libtime: strftime and strptime return type changed to `Result<Str…
Browse files Browse the repository at this point in the history
…ing, 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]
  • Loading branch information
hatahet committed Oct 12, 2014
1 parent f7fb0f5 commit 84ce372
Showing 1 changed file with 256 additions and 203 deletions.
Loading

9 comments on commit 84ce372

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at hatahet@84ce372

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging hatahet/rust/mybranch = 84ce372c into auto

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hatahet/rust/mybranch = 84ce372c merged ok, testing candidate = 88739d75

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at hatahet@84ce372

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging hatahet/rust/mybranch = 84ce372c into auto

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hatahet/rust/mybranch = 84ce372c merged ok, testing candidate = ff61b74

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 84ce372 Oct 13, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = ff61b74

Please sign in to comment.