This commit is contained in:
sunface
2022-03-14 15:43:51 +08:00
2 changed files with 2 additions and 2 deletions

View File

@ -258,7 +258,7 @@ This restriction is often called as the orphan rule, so named because the parent
Its 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

View File

@ -249,7 +249,7 @@ fn main() {
5. 🌟🌟
```rust
```rust,editable
use std::fmt;
// 定义一个 newtype `Pretty`