Uh oh!
There was an error while loading. Please reload this page.
Hide unnecessary error checking from the user - #22739
Conversation
This affects the `set_non_blocking` function which cannot fail for Unix or Windows, given correct parameters. Additionally, the short UDP write error case has been removed as there is no such thing as "short UDP writes", instead, the operating system will error out if the application tries to send a packet larger than the MTU of the network path.
rust-highfive
commented
Feb 23, 2015
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Feb 23, 2015
What's the motivation for doing this? It seems backwards to explicitly remove this error handling. |
tbu-
commented
Feb 24, 2015
The motivation for this is that the only errors There is also no such thing as a partially sent UDP packet, so if the OS returns that it has been partially sent, something has already gone horribly wrong (see also the commit message). |
There was a problem hiding this comment.
shouldn't this panic in the true-path and leave out the else path instead of unwrapping a fresh Result?
There was a problem hiding this comment.
This should be equivalent and will provide the contents of a potential error.
There was a problem hiding this comment.
dropping the else-path and calling unwrap() on Err(last_error()) would increase readability imho
alexcrichton
commented
Feb 24, 2015
This affects the `set_non_blocking` function which cannot fail for Unix or Windows, given correct parameters. Additionally, the short UDP write error case has been removed as there is no such thing as \"short UDP writes\", instead, the operating system will error out if the application tries to send a packet larger than the MTU of the network path.
Manishearth
commented
Feb 25, 2015
Needs Manishearth@e61a790 ; Manishearth@2470fa1 to compile on windows. |
bors
commented
Feb 25, 2015
⌛ Testing commit 0fc1a7d with merge 2baaabd... |
bors
commented
Feb 25, 2015
💔 Test failed - auto-win-64-opt |
…base internal: remove `ExpandDatabase`
This affects the
set_non_blockingfunction which cannot fail for Unix orWindows, given correct parameters. Additionally, the short UDP write error case
has been removed as there is no such thing as "short UDP writes", instead, the
operating system will error out if the application tries to send a packet
larger than the MTU of the network path.