diff options
| author | bors <bors@rust-lang.org> | 2015-02-17 03:42:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-17 03:42:54 +0000 |
| commit | 22224ca4499247e99e18fba8a18a4259f0e4d08b (patch) | |
| tree | a2a083c91ddb8586682039fc48d384c6fa963b38 /src/libstd/old_io | |
| parent | 81bce5290ff55b9a2eddd83d31b0778180904d7f (diff) | |
| parent | 64d33b1e986116f7bec03b8f2c91fa925b957fa3 (diff) | |
| download | rust-22224ca4499247e99e18fba8a18a4259f0e4d08b.tar.gz rust-22224ca4499247e99e18fba8a18a4259f0e4d08b.zip | |
Auto merge of #21932 - Jormundir:std-os-errno-type, r=alexcrichton
Changes std::os::errno to return i32, the return type used by the function being delegated to. This is my first contribution, so feel free to give me advice. I'll be happy to correct things.
Diffstat (limited to 'src/libstd/old_io')
| -rw-r--r-- | src/libstd/old_io/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/old_io/mod.rs b/src/libstd/old_io/mod.rs index 94f4af8e558..3673f590c0a 100644 --- a/src/libstd/old_io/mod.rs +++ b/src/libstd/old_io/mod.rs @@ -338,7 +338,7 @@ impl IoError { /// If `detail` is `true`, the `detail` field of the `IoError` /// struct is filled with an allocated string describing the error /// in more detail, retrieved from the operating system. - pub fn from_errno(errno: uint, detail: bool) -> IoError { + pub fn from_errno(errno: i32, detail: bool) -> IoError { let mut err = sys::decode_error(errno as i32); if detail && err.kind == OtherIoError { err.detail = Some(os::error_string(errno).chars() @@ -354,7 +354,7 @@ impl IoError { /// operating system) between the call(s) for which errors are /// being checked and the call of this function. pub fn last_error() -> IoError { - IoError::from_errno(os::errno() as uint, true) + IoError::from_errno(os::errno(), true) } } |
