File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ static call to the relevant implementation:
186
186
``` rust
187
187
// The compiled code:
188
188
__print_hash_bool (& true ); // invoke specialized bool version directly
189
- __print_hash_i64 (& true ); // invoke specialized i64 version directly
189
+ __print_hash_i64 (& 12_ i64 ); // invoke specialized i64 version directly
190
190
```
191
191
192
192
This compilation model isn't so useful for a function like ` print_hash ` , but
@@ -348,7 +348,7 @@ wind up playing a few other important roles in Rust. Here's a taste:
348
348
method is defined with multiple signatures. But traits provide much of the
349
349
benefit of overloading: if a method is defined generically over a trait, it
350
350
can be called with any type implementing that trait. Compared to traditional
351
- overloading, this has two advantages. First, it means the overloading is not
351
+ overloading, this has two advantages. First, it means the overloading is less
352
352
[ ad hoc] [ adhoc ] : once you understand a trait, you immediately understand the
353
353
overloading pattern of any APIs using it. Second, it is * extensible* : you can
354
354
effectively provide new overloads downstream from a method by providing new
You can’t perform that action at this time.
0 commit comments