Skip to content

Commit

Permalink
missing parameter name in Trait Implementations
Browse files Browse the repository at this point in the history
The example in Trait Implementations was missing a parameter name in a
trait method declaration, which is no longer allowed in the
2018 edition.
  • Loading branch information
tlyu committed May 24, 2021
1 parent f34a622 commit d1f22f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/items/implementations.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ keyword.
# struct Point {x: f64, y: f64};
# type Surface = i32;
# struct BoundingBox {x: f64, y: f64, width: f64, height: f64};
# trait Shape { fn draw(&self, Surface); fn bounding_box(&self) -> BoundingBox; }
# trait Shape { fn draw(&self, s: Surface); fn bounding_box(&self) -> BoundingBox; }
# fn do_draw_circle(s: Surface, c: Circle) { }
struct Circle {
radius: f64,
Expand Down

0 comments on commit d1f22f6

Please sign in to comment.