diff options
| author | Rahiel Kasim <rahielkasim@gmail.com> | 2016-07-26 11:14:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-26 11:14:46 +0200 |
| commit | 47db8deff6b50512d1c6e702d4df6bd9027efe04 (patch) | |
| tree | cf4213f0d0bed9308dd104e13af67068bd6b275b | |
| parent | 9316ae515e2f8f3f497fb4f1559910c1eef2433d (diff) | |
| download | rust-47db8deff6b50512d1c6e702d4df6bd9027efe04.tar.gz rust-47db8deff6b50512d1c6e702d4df6bd9027efe04.zip | |
doc/book/trait-objects: remove empty lines at start of examples
| -rw-r--r-- | src/doc/book/trait-objects.md | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/doc/book/trait-objects.md b/src/doc/book/trait-objects.md index b31a34a0425..b1aee579aab 100644 --- a/src/doc/book/trait-objects.md +++ b/src/doc/book/trait-objects.md @@ -123,7 +123,6 @@ dispatch with trait objects by casting: # trait Foo { fn method(&self) -> String; } # impl Foo for u8 { fn method(&self) -> String { format!("u8: {}", *self) } } # impl Foo for String { fn method(&self) -> String { format!("string: {}", *self) } } - fn do_something(x: &Foo) { x.method(); } @@ -140,7 +139,6 @@ or by coercing: # trait Foo { fn method(&self) -> String; } # impl Foo for u8 { fn method(&self) -> String { format!("u8: {}", *self) } } # impl Foo for String { fn method(&self) -> String { format!("string: {}", *self) } } - fn do_something(x: &Foo) { x.method(); } |
