about summary refs log tree commit diff
path: root/src/libstd/sys/unix/process/process_common.rs
diff options
context:
space:
mode:
authorAndre Bogus <bogusandre@gmail.com>2017-07-15 08:35:25 +0200
committerAndre Bogus <bogusandre@gmail.com>2017-07-24 22:41:05 +0200
commit72ef15e0df7cc1a794d79559a3da79321eec7bfb (patch)
tree19777dcad52fc2508079b698521c313cf6a0179d /src/libstd/sys/unix/process/process_common.rs
parentb4502f7c0b51526d0177204a71dc2b3200f7348b (diff)
downloadrust-72ef15e0df7cc1a794d79559a3da79321eec7bfb.tar.gz
rust-72ef15e0df7cc1a794d79559a3da79321eec7bfb.zip
improve the TryFrom implementations
This removes the need for a 128 bit storage by making use of the fact that
there can be either no over/underflow, either one or both, and each time
the target type suffices to hold the limit for comparison.

The downside is that the code looks a bit more complex.

This test code included in this commit is from @oyvindln 's PR. They also
greatly helped fixing a number of errors I made along the way. Thanks a lot!
Diffstat (limited to 'src/libstd/sys/unix/process/process_common.rs')
0 files changed, 0 insertions, 0 deletions