Skip to content

Commit e4a7461

Browse files
committed
Remove unnecessary type casts.
1 parent b877b77 commit e4a7461

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libstd/old_io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ impl IoError {
353353
/// operating system) between the call(s) for which errors are
354354
/// being checked and the call of this function.
355355
pub fn last_error() -> IoError {
356-
IoError::from_errno(os::errno() as i32, true)
356+
IoError::from_errno(os::errno(), true)
357357
}
358358
}
359359

src/libstd/os.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -527,12 +527,12 @@ pub fn errno() -> i32 {
527527
/// println!("{}", os::error_string(os::errno() as i32));
528528
/// ```
529529
pub fn error_string(errnum: i32) -> String {
530-
return sys::os::error_string(errnum as i32);
530+
return sys::os::error_string(errnum);
531531
}
532532

533533
/// Get a string representing the platform-dependent last error
534534
pub fn last_os_error() -> String {
535-
error_string(errno() as i32)
535+
error_string(errno())
536536
}
537537

538538
/// Sets the process exit code

0 commit comments

Comments
 (0)