From e50df770ccca67d2f66369953e14bf6cdb98418a Mon Sep 17 00:00:00 2001 From: Valerii Hiora Date: Thu, 30 Apr 2015 16:42:37 +0300 Subject: Fixed iOS build --- src/libstd/os/ios/raw.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/os/ios/raw.rs b/src/libstd/os/ios/raw.rs index 3266b3846d8..a66e01b2c39 100644 --- a/src/libstd/os/ios/raw.rs +++ b/src/libstd/os/ios/raw.rs @@ -11,7 +11,7 @@ //! iOS-specific raw type definitions use os::raw::c_long; -use os::unix::raw::{uid_t, gid_t, pid_t}; +use os::unix::raw::{uid_t, gid_t}; pub type blkcnt_t = i64; pub type blksize_t = i32; -- cgit 1.4.1-3-g733a5 From 27bcd2ebc75b45b3c1afc6cc67ce652b7fdca2e6 Mon Sep 17 00:00:00 2001 From: Sébastien Marie Date: Thu, 30 Apr 2015 17:26:53 +0200 Subject: remove denied unused import: pid_t in raw - unbreak the build under openbsd - while here, apply same modification to dragonfly, freebsd, ios (pid_t imported, but not used in raw.rs) --- src/libstd/os/dragonfly/raw.rs | 2 +- src/libstd/os/freebsd/raw.rs | 2 +- src/libstd/os/ios/raw.rs | 2 +- src/libstd/os/openbsd/raw.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/os/dragonfly/raw.rs b/src/libstd/os/dragonfly/raw.rs index 22c811ead43..86522cc1e79 100644 --- a/src/libstd/os/dragonfly/raw.rs +++ b/src/libstd/os/dragonfly/raw.rs @@ -11,7 +11,7 @@ //! Dragonfly-specific raw type definitions use os::raw::c_long; -use os::unix::raw::{pid_t, uid_t, gid_t}; +use os::unix::raw::{uid_t, gid_t}; pub type blkcnt_t = i64; pub type blksize_t = u32; diff --git a/src/libstd/os/freebsd/raw.rs b/src/libstd/os/freebsd/raw.rs index a810eff45d3..a3b95738a1a 100644 --- a/src/libstd/os/freebsd/raw.rs +++ b/src/libstd/os/freebsd/raw.rs @@ -11,7 +11,7 @@ //! FreeBSD-specific raw type definitions use os::raw::c_long; -use os::unix::raw::{uid_t, gid_t, pid_t}; +use os::unix::raw::{uid_t, gid_t}; pub type blkcnt_t = i64; pub type blksize_t = i64; diff --git a/src/libstd/os/ios/raw.rs b/src/libstd/os/ios/raw.rs index 3266b3846d8..a66e01b2c39 100644 --- a/src/libstd/os/ios/raw.rs +++ b/src/libstd/os/ios/raw.rs @@ -11,7 +11,7 @@ //! iOS-specific raw type definitions use os::raw::c_long; -use os::unix::raw::{uid_t, gid_t, pid_t}; +use os::unix::raw::{uid_t, gid_t}; pub type blkcnt_t = i64; pub type blksize_t = i32; diff --git a/src/libstd/os/openbsd/raw.rs b/src/libstd/os/openbsd/raw.rs index 632a8c336b7..0bdba9e3487 100644 --- a/src/libstd/os/openbsd/raw.rs +++ b/src/libstd/os/openbsd/raw.rs @@ -11,7 +11,7 @@ //! OpenBSD-specific raw type definitions use os::raw::c_long; -use os::unix::raw::{uid_t, gid_t, pid_t}; +use os::unix::raw::{uid_t, gid_t}; pub type blkcnt_t = i64; pub type blksize_t = u32; -- cgit 1.4.1-3-g733a5 From ded5781cb910d659ef77147c1186180adcede793 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 30 Apr 2015 19:20:59 -0400 Subject: Remove unnecessary 'mut' qualifier on doc-comment var The variable doesn't need to be mutable. --- src/libstd/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 2b15a4ff83e..5a05c61e064 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -643,7 +643,7 @@ impl Permissions { /// use std::fs::File; /// /// # fn foo() -> std::io::Result<()> { - /// let mut f = try!(File::create("foo.txt")); + /// let f = try!(File::create("foo.txt")); /// let metadata = try!(f.metadata()); /// let mut permissions = metadata.permissions(); /// -- cgit 1.4.1-3-g733a5 From d69cf2940ed696fd876faf85c6bed163fc60a824 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 30 Apr 2015 18:14:41 -0700 Subject: doc: current_dir returns a PathBuf, not a Path --- src/libstd/env.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 114d0dd79a0..facf33de6bb 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -27,7 +27,7 @@ use sync::atomic::{AtomicIsize, ATOMIC_ISIZE_INIT, Ordering}; use sync::{StaticMutex, MUTEX_INIT}; use sys::os as os_imp; -/// Returns the current working directory as a `Path`. +/// Returns the current working directory as a `PathBuf`. /// /// # Errors /// -- cgit 1.4.1-3-g733a5 From 554da45762ff11def1d7ef85c68d4ed86550aa40 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 30 Apr 2015 21:38:01 -0400 Subject: Replaces instanced of 'an UTF' with 'a UTF' Even spelled out, one would say 'a Universal Character Set' --- src/librustc_unicode/u_str.rs | 2 +- src/libstd/io/mod.rs | 2 +- src/libstd/sys/common/wtf8.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstd') diff --git a/src/librustc_unicode/u_str.rs b/src/librustc_unicode/u_str.rs index 898844e3bf1..f4c85f18a7e 100644 --- a/src/librustc_unicode/u_str.rs +++ b/src/librustc_unicode/u_str.rs @@ -525,7 +525,7 @@ pub struct Utf16Encoder { } impl Utf16Encoder { - /// Create an UTF-16 encoder from any `char` iterator. + /// Create a UTF-16 encoder from any `char` iterator. pub fn new(chars: I) -> Utf16Encoder where I: Iterator { Utf16Encoder { chars: chars, extra: 0 } } diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 561c37ad950..9089b417fcb 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -236,7 +236,7 @@ pub trait Read { /// Transforms this `Read` instance to an `Iterator` over `char`s. /// - /// This adaptor will attempt to interpret this reader as an UTF-8 encoded + /// This adaptor will attempt to interpret this reader as a UTF-8 encoded /// sequence of characters. The returned iterator will return `None` once /// EOF is reached for this reader. Otherwise each element yielded will be a /// `Result` where `E` may contain information about what I/O error diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index 56a952e6a7e..cb9239ed7ba 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -161,7 +161,7 @@ impl Wtf8Buf { Wtf8Buf { bytes: Vec::with_capacity(n) } } - /// Creates a WTF-8 string from an UTF-8 `String`. + /// Creates a WTF-8 string from a UTF-8 `String`. /// /// This takes ownership of the `String` and does not copy. /// @@ -171,7 +171,7 @@ impl Wtf8Buf { Wtf8Buf { bytes: string.into_bytes() } } - /// Creates a WTF-8 string from an UTF-8 `&str` slice. + /// Creates a WTF-8 string from a UTF-8 `&str` slice. /// /// This copies the content of the slice. /// @@ -245,7 +245,7 @@ impl Wtf8Buf { self.bytes.capacity() } - /// Append an UTF-8 slice at the end of the string. + /// Append a UTF-8 slice at the end of the string. #[inline] pub fn push_str(&mut self, other: &str) { self.bytes.push_all(other.as_bytes()) @@ -527,7 +527,7 @@ impl Wtf8 { } /// Lossily converts the string to UTF-8. - /// Returns an UTF-8 `&str` slice if the contents are well-formed in UTF-8. + /// Returns a UTF-8 `&str` slice if the contents are well-formed in UTF-8. /// /// Surrogates are replaced with `"\u{FFFD}"` (the replacement character “�”). /// -- cgit 1.4.1-3-g733a5