From a181d2fad466b716006e0ad8b68c022a84e27494 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 12 May 2016 23:25:33 +0200 Subject: [PATCH 1/8] doc: line these comments up Looks more nice, and same is done with prior examples --- src/libcollections/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index ce1d6ec5a64..ca8cb25e1a4 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" //! ``` //! From 10c984a155eda8bada42f4b74528eb5c1a2bc826 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 12 May 2016 23:37:17 +0200 Subject: [PATCH 2/8] doc: use less awkward and less confusing language --- src/libcollections/fmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index ce1d6ec5a64..3f88183d27a 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -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); From 226cb9c9bd951d24ea5b686d5dbfcf65bd71855c Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 12 May 2016 23:11:52 +0200 Subject: [PATCH 3/8] doc: to_string not needed since we gots coercion --- src/libcollections/fmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index ce1d6ec5a64..c8030c1efd6 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -527,7 +527,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 +535,7 @@ use string; /// /// ``` /// let s = format!("Hello, {}!", "world"); -/// assert_eq!(s, "Hello, world!".to_string()); +/// assert_eq!(s, "Hello, world!"); /// ``` /// /// [format!]: ../macro.format!.html From ef53fa76df3960ea293a2e83975cc18c8f848d57 Mon Sep 17 00:00:00 2001 From: Scott Olson Date: Sat, 14 May 2016 01:16:08 -0600 Subject: [PATCH 4/8] rustbuild: Ignore user config.toml file. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 972f527046b..acd47803969 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ /*-*-*/ /Makefile /build +/config.toml /dist/ /dl/ /doc From deb8165b36ea8cdc5a1e4cfead9e70ec24f38bed Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 14 May 2016 11:55:46 +0200 Subject: [PATCH 5/8] doc: this statement does not have an effect --- src/libcollections/fmt.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index ce1d6ec5a64..479b92a70f2 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -292,8 +292,6 @@ //! 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")); //! From 971a3afe4828ad37a47bbb23ecdfbb012f6770b6 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 14 May 2016 12:35:02 +0200 Subject: [PATCH 6/8] doc: improve output --- src/libcollections/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index ce1d6ec5a64..07a7028d6c9 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -300,7 +300,7 @@ //! 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`. From e699e12eb0b58782e2f1cb5bc1b0364ca49b7ffb Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sat, 14 May 2016 13:02:28 +0200 Subject: [PATCH 7/8] doc: 'tis the lang, not the reptile --- src/libcollections/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs index ce1d6ec5a64..6e33e9ec1c7 100644 --- a/src/libcollections/fmt.rs +++ b/src/libcollections/fmt.rs @@ -316,7 +316,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: //! From 92abda02c4c7bc128ff8e8271ffcf85f978b2cab Mon Sep 17 00:00:00 2001 From: Florian Berger Date: Sun, 15 May 2016 19:59:18 +0300 Subject: [PATCH 8/8] Update link to license --- src/doc/footer.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@