From 3fe8575c6e55bf754b7be13db82b2cde384ca144 Mon Sep 17 00:00:00 2001 From: Mark Mansi Date: Mon, 17 Sep 2018 18:00:10 -0500 Subject: [PATCH] No anon params! --- src/items/associated-items.md | 8 ++++---- src/items/traits.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/items/associated-items.md b/src/items/associated-items.md index 9b9903759..1371355c9 100644 --- a/src/items/associated-items.md +++ b/src/items/associated-items.md @@ -99,7 +99,7 @@ Consider the following trait: # type Surface = i32; # type BoundingBox = i32; trait Shape { - fn draw(&self, Surface); + fn draw(&self, surface: Surface); fn bounding_box(&self) -> BoundingBox; } ``` @@ -112,7 +112,7 @@ of this trait while the trait is in scope can have their `draw` and # type Surface = i32; # type BoundingBox = i32; # trait Shape { -# fn draw(&self, Surface); +# fn draw(&self, surface: Surface); # fn bounding_box(&self) -> BoundingBox; # } # @@ -191,7 +191,7 @@ available for use in the method signatures: trait Container { type E; fn empty() -> Self; - fn insert(&mut self, Self::E); + fn insert(&mut self, elem: Self::E); } ``` @@ -203,7 +203,7 @@ implementation of `Container` for the standard library type `Vec`: # trait Container { # type E; # fn empty() -> Self; -# fn insert(&mut self, Self::E); +# fn insert(&mut self, elem: Self::E); # } impl Container for Vec { type E = T; diff --git a/src/items/traits.md b/src/items/traits.md index 5e830a8c3..8ce9b7a57 100644 --- a/src/items/traits.md +++ b/src/items/traits.md @@ -32,7 +32,7 @@ after the trait name, using the same syntax used in [generic functions]. trait Seq { fn len(&self) -> u32; fn elt_at(&self, n: u32) -> T; - fn iter(&self, F) where F: Fn(T); + fn iter(&self, f: F) where F: Fn(T); } ```