Skip to content

Commit da31289

Browse files
authored
Tiny typo (#945)
1 parent da922ff commit da31289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guide/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn parser<'src>() -> impl Parser<'src, &'src str, ()> {
8080

8181
2. Because large parsers can have rather unwieldy types, we save ourselves the need to declare the exact return type
8282
with Rust's `impl Trait` syntax. This says to the compiler "we don't actually care what type is returned here, but
83-
it needs to implement the `Parser<'src, &'src, str, ()>` trait, you figure it out". Note that, unlike `dyn Trait`
83+
it needs to implement the `Parser<'src, &'src str, ()>` trait, you figure it out". Note that, unlike `dyn Trait`
8484
syntax, `impl Trait` has no runtime cost: the compiler simply *hides* the type from you rather than performing
8585
*type erasure*, which would require performing [dynamic dispatch](https://en.wikipedia.org/wiki/Dynamic_dispatch)
8686
while your code is running.

0 commit comments

Comments
 (0)