fix: the code of advanced-traits ch-5 should be editable
This commit is contained in:
parent
fca5084157
commit
5a1c36cc23
|
@ -258,7 +258,7 @@ This restriction is often called as the orphan rule, so named because the parent
|
|||
It’s possible to get around this restriction using the newtype pattern, which involves creating a new type in a tuple struct.
|
||||
|
||||
5. 🌟🌟
|
||||
```rust
|
||||
```rust,editable
|
||||
use std::fmt;
|
||||
|
||||
// DEFINE a newtype `Pretty` here
|
||||
|
|
|
@ -249,7 +249,7 @@ fn main() {
|
|||
|
||||
|
||||
5. 🌟🌟
|
||||
```rust
|
||||
```rust,editable
|
||||
use std::fmt;
|
||||
|
||||
// 定义一个 newtype `Pretty`
|
||||
|
|
Loading…
Reference in New Issue