From f21b29560c74d44b0401f208f2d0f9a7889694b1 Mon Sep 17 00:00:00 2001 From: Alexei Sholik Date: Wed, 25 Jun 2014 11:29:28 +0300 Subject: [PATCH 1/2] Fix a typo in fmt.rs --- src/libstd/fmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/fmt.rs b/src/libstd/fmt.rs index b1164981c0b..dc6f5486849 100644 --- a/src/libstd/fmt.rs +++ b/src/libstd/fmt.rs @@ -101,8 +101,8 @@ format!("{a:s} {c:d} {b:?}", a="a", b=(), c=3i); // => "a 3 ()" ``` It is illegal to put positional parameters (those without names) after arguments -which have names. Like positional parameters, it is illegal to provided named -parameters that are unused by the format string. +which have names. Like with positional parameters, it is illegal to provide +named parameters that are unused by the format string. ### Argument types From beff6101026334ce8b04b08c34062acffbd044fd Mon Sep 17 00:00:00 2001 From: Alexei Sholik Date: Wed, 25 Jun 2014 12:12:28 +0300 Subject: [PATCH 2/2] Fix wrong type name: IoError<()> -> IoResult<()> --- src/libstd/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/fmt.rs b/src/libstd/fmt.rs index dc6f5486849..ef0c59268c3 100644 --- a/src/libstd/fmt.rs +++ b/src/libstd/fmt.rs @@ -185,7 +185,7 @@ struct. In order to help with this, the `Formatter` struct also provides some helper methods. Additionally, the return value of this function is `fmt::Result` which is a -typedef to `Result<(), IoError>` (also known as `IoError<()>`). Formatting +typedef to `Result<(), IoError>` (also known as `IoResult<()>`). Formatting implementations should ensure that they return errors from `write!` correctly (propagating errors upward).