diff options
| author | Jormundir <Chaseph@gmail.com> | 2015-02-04 20:16:18 -0800 |
|---|---|---|
| committer | Jormundir <Chaseph@gmail.com> | 2015-02-04 20:16:18 -0800 |
| commit | e4a74616bf32068a77d76cc2591b3969ea884b9f (patch) | |
| tree | 7b523a006456d948c61a27476d880ba91d1a330f /src/libstd | |
| parent | b877b77f1363c6e8bb8b9cc11c600ecb17a2fcc9 (diff) | |
| download | rust-e4a74616bf32068a77d76cc2591b3969ea884b9f.tar.gz rust-e4a74616bf32068a77d76cc2591b3969ea884b9f.zip | |
Remove unnecessary type casts.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/old_io/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/os.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/old_io/mod.rs b/src/libstd/old_io/mod.rs index 8818211010f..4a29fa06c77 100644 --- a/src/libstd/old_io/mod.rs +++ b/src/libstd/old_io/mod.rs @@ -353,7 +353,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 i32, true) + IoError::from_errno(os::errno(), true) } } diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 8d1c3a1e3ae..9e483a4048e 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -527,12 +527,12 @@ pub fn errno() -> i32 { /// println!("{}", os::error_string(os::errno() as i32)); /// ``` pub fn error_string(errnum: i32) -> String { - return sys::os::error_string(errnum as i32); + return sys::os::error_string(errnum); } /// Get a string representing the platform-dependent last error pub fn last_os_error() -> String { - error_string(errno() as i32) + error_string(errno()) } /// Sets the process exit code |
