diff options
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/backtrace/tracing/gcc_s.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/net.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/os.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sys/unix/stdio.rs | 6 | ||||
| -rw-r--r-- | src/libstd/sys/unix/thread.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/thread_local.rs | 2 | 
6 files changed, 10 insertions, 10 deletions
diff --git a/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs b/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs index cdaf69c4882..8b32b5ec040 100644 --- a/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs +++ b/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs @@ -99,7 +99,7 @@ pub fn write(w: &mut Write) -> io::Result<()> { } // keep going - return uw::_URC_NO_REASON + uw::_URC_NO_REASON } } diff --git a/src/libstd/sys/unix/net.rs b/src/libstd/sys/unix/net.rs index f1a9518d08d..6d65cb838f6 100644 --- a/src/libstd/sys/unix/net.rs +++ b/src/libstd/sys/unix/net.rs @@ -35,7 +35,7 @@ pub fn cvt_gai(err: c_int) -> io::Result<()> { let detail = unsafe { str::from_utf8(CStr::from_ptr(c::gai_strerror(err)).to_bytes()).unwrap() - .to_string() + .to_owned() }; Err(io::Error::new(io::ErrorKind::Other, &format!("failed to lookup address information: {}", diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index 70be04b631a..af0d8da05f4 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -88,7 +88,7 @@ pub fn error_string(errno: i32) -> String { } let p = p as *const _; - str::from_utf8(CStr::from_ptr(p).to_bytes()).unwrap().to_string() + str::from_utf8(CStr::from_ptr(p).to_bytes()).unwrap().to_owned() } } @@ -134,7 +134,7 @@ pub struct SplitPaths<'a> { fn(&'a [u8]) -> PathBuf>, } -pub fn split_paths<'a>(unparsed: &'a OsStr) -> SplitPaths<'a> { +pub fn split_paths(unparsed: &OsStr) -> SplitPaths { fn bytes_to_path(b: &[u8]) -> PathBuf { PathBuf::from(<OsStr as OsStrExt>::from_bytes(b)) } @@ -142,7 +142,7 @@ pub fn split_paths<'a>(unparsed: &'a OsStr) -> SplitPaths<'a> { let unparsed = unparsed.as_bytes(); SplitPaths { iter: unparsed.split(is_colon as fn(&u8) -> bool) - .map(bytes_to_path as fn(&'a [u8]) -> PathBuf) + .map(bytes_to_path as fn(&[u8]) -> PathBuf) } } diff --git a/src/libstd/sys/unix/stdio.rs b/src/libstd/sys/unix/stdio.rs index c87800a1498..ccbb14677c7 100644 --- a/src/libstd/sys/unix/stdio.rs +++ b/src/libstd/sys/unix/stdio.rs @@ -23,7 +23,7 @@ impl Stdin { let fd = FileDesc::new(libc::STDIN_FILENO); let ret = fd.read(data); fd.into_raw(); - return ret; + ret } } @@ -34,7 +34,7 @@ impl Stdout { let fd = FileDesc::new(libc::STDOUT_FILENO); let ret = fd.write(data); fd.into_raw(); - return ret; + ret } } @@ -45,7 +45,7 @@ impl Stderr { let fd = FileDesc::new(libc::STDERR_FILENO); let ret = fd.write(data); fd.into_raw(); - return ret; + ret } } diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 5a551e2b3f3..268ec7fe356 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -310,7 +310,7 @@ pub mod guard { ret = Some(stackaddr as usize + guardsize as usize); } assert_eq!(pthread_attr_destroy(&mut attr), 0); - return ret + ret } #[cfg(any(target_os = "linux", target_os = "android"))] diff --git a/src/libstd/sys/unix/thread_local.rs b/src/libstd/sys/unix/thread_local.rs index c375788fdc1..e697417675d 100644 --- a/src/libstd/sys/unix/thread_local.rs +++ b/src/libstd/sys/unix/thread_local.rs @@ -18,7 +18,7 @@ pub type Key = pthread_key_t; pub unsafe fn create(dtor: Option<unsafe extern fn(*mut u8)>) -> Key { let mut key = 0; assert_eq!(pthread_key_create(&mut key, dtor), 0); - return key; + key } #[inline]  | 
