Skip to content

Return errors when swap_nonatomic fails#8

Merged
debris merged 2 commits intodebris:masterfrom
ngotchac:error-handling
Sep 11, 2018
Merged

Return errors when swap_nonatomic fails#8
debris merged 2 commits intodebris:masterfrom
ngotchac:error-handling

Conversation

@ngotchac
Copy link
Copy Markdown
Contributor

@ngotchac ngotchac commented Sep 7, 2018

Don't silently fail when non-atomic swap fails

Comment thread src/lib.rs Outdated
match fs::rename(b, a) {
Ok(_) => (),
Err(_) => {
Err(e) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since we're not using e directly, Err(e) can be matched by error or other variable name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

@debris debris merged commit c9644f4 into debris:master Sep 11, 2018
@debris
Copy link
Copy Markdown
Owner

debris commented Sep 11, 2018

thanks! published in 0.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants