about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/doc/footer.inc2
-rw-r--r--src/libcollections/fmt.rs16
2 files changed, 8 insertions, 10 deletions
diff --git a/src/doc/footer.inc b/src/doc/footer.inc
index b5eb589eb53..952846dd5e2 100644
--- a/src/doc/footer.inc
+++ b/src/doc/footer.inc
@@ -1,7 +1,7 @@
 <footer><p>
 Copyright &copy; 2011-2015 The Rust Project Developers. Licensed under the
 <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
-or the <a href="http://opensource.org/licenses/MIT">MIT license</a>, at your option.
+or the <a href="https://opensource.org/licenses/MIT">MIT license</a>, at your option.
 </p><p>
 This file may not be copied, modified, or distributed except according to those terms.
 </p></footer>
diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs
index ce1d6ec5a64..0ebb89b8a22 100644
--- a/src/libcollections/fmt.rs
+++ b/src/libcollections/fmt.rs
@@ -81,7 +81,7 @@
 //!
 //! ```
 //! format!("{argument}", argument = "test");   // => "test"
-//! format!("{name} {}", 1, name = 2);        // => "2 1"
+//! format!("{name} {}", 1, name = 2);          // => "2 1"
 //! format!("{a} {c} {b}", a="a", b='b', c=3);  // => "a 3 b"
 //! ```
 //!
@@ -104,8 +104,8 @@
 //! octal.
 //!
 //! There are various parameters which do require a particular type, however.
-//! Namely, the `{:.*}` syntax, which sets the number of numbers after the
-//! decimal in floating-point types:
+//! An example is the `{:.*}` syntax, which sets the number of decimal places
+//! in floating-point types:
 //!
 //! ```
 //! let formatted_number = format!("{:.*}", 2, 1.234567);
@@ -292,15 +292,13 @@
 //! use std::fmt;
 //! use std::io::{self, Write};
 //!
-//! fmt::format(format_args!("this returns {}", "String"));
-//!
 //! let mut some_writer = io::stdout();
 //! write!(&mut some_writer, "{}", format_args!("print with a {}", "macro"));
 //!
 //! fn my_fmt_fn(args: fmt::Arguments) {
 //!     write!(&mut io::stdout(), "{}", args);
 //! }
-//! my_fmt_fn(format_args!("or a {} too", "function"));
+//! my_fmt_fn(format_args!(", or a {} too", "function"));
 //! ```
 //!
 //! The result of the `format_args!` macro is a value of type `fmt::Arguments`.
@@ -316,7 +314,7 @@
 //! # Syntax
 //!
 //! The syntax for the formatting language used is drawn from other languages,
-//! so it should not be too alien. Arguments are formatted with python-like
+//! so it should not be too alien. Arguments are formatted with Python-like
 //! syntax, meaning that arguments are surrounded by `{}` instead of the C-like
 //! `%`. The actual grammar for the formatting syntax is:
 //!
@@ -527,7 +525,7 @@ use string;
 /// use std::fmt;
 ///
 /// let s = fmt::format(format_args!("Hello, {}!", "world"));
-/// assert_eq!(s, "Hello, world!".to_string());
+/// assert_eq!(s, "Hello, world!");
 /// ```
 ///
 /// Please note that using [`format!`][format!] might be preferrable.
@@ -535,7 +533,7 @@ use string;
 ///
 /// ```
 /// let s = format!("Hello, {}!", "world");
-/// assert_eq!(s, "Hello, world!".to_string());
+/// assert_eq!(s, "Hello, world!");
 /// ```
 ///
 /// [format!]: ../macro.format!.html