Skip to content

Commit 616b94b

Browse files
committed
Rollup merge of #25021 - frewsxcv:an-utf, r=steveklabnik
Even spelled out, one would say 'a Universal Character Set'
2 parents ac7a75e + 554da45 commit 616b94b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/librustc_unicode/u_str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ pub struct Utf16Encoder<I> {
525525
}
526526

527527
impl<I> Utf16Encoder<I> {
528-
/// Create an UTF-16 encoder from any `char` iterator.
528+
/// Create a UTF-16 encoder from any `char` iterator.
529529
pub fn new(chars: I) -> Utf16Encoder<I> where I: Iterator<Item=char> {
530530
Utf16Encoder { chars: chars, extra: 0 }
531531
}

src/libstd/io/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ pub trait Read {
236236

237237
/// Transforms this `Read` instance to an `Iterator` over `char`s.
238238
///
239-
/// This adaptor will attempt to interpret this reader as an UTF-8 encoded
239+
/// This adaptor will attempt to interpret this reader as a UTF-8 encoded
240240
/// sequence of characters. The returned iterator will return `None` once
241241
/// EOF is reached for this reader. Otherwise each element yielded will be a
242242
/// `Result<char, E>` where `E` may contain information about what I/O error

src/libstd/sys/common/wtf8.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl Wtf8Buf {
161161
Wtf8Buf { bytes: Vec::with_capacity(n) }
162162
}
163163

164-
/// Creates a WTF-8 string from an UTF-8 `String`.
164+
/// Creates a WTF-8 string from a UTF-8 `String`.
165165
///
166166
/// This takes ownership of the `String` and does not copy.
167167
///
@@ -171,7 +171,7 @@ impl Wtf8Buf {
171171
Wtf8Buf { bytes: string.into_bytes() }
172172
}
173173

174-
/// Creates a WTF-8 string from an UTF-8 `&str` slice.
174+
/// Creates a WTF-8 string from a UTF-8 `&str` slice.
175175
///
176176
/// This copies the content of the slice.
177177
///
@@ -245,7 +245,7 @@ impl Wtf8Buf {
245245
self.bytes.capacity()
246246
}
247247

248-
/// Append an UTF-8 slice at the end of the string.
248+
/// Append a UTF-8 slice at the end of the string.
249249
#[inline]
250250
pub fn push_str(&mut self, other: &str) {
251251
self.bytes.push_all(other.as_bytes())
@@ -527,7 +527,7 @@ impl Wtf8 {
527527
}
528528

529529
/// Lossily converts the string to UTF-8.
530-
/// Returns an UTF-8 `&str` slice if the contents are well-formed in UTF-8.
530+
/// Returns a UTF-8 `&str` slice if the contents are well-formed in UTF-8.
531531
///
532532
/// Surrogates are replaced with `"\u{FFFD}"` (the replacement character “�”).
533533
///

0 commit comments

Comments
 (0)