diff --git a/src/generics-traits/advanced-traits.md b/src/generics-traits/advanced-traits.md index 5c2068a..c761aba 100644 --- a/src/generics-traits/advanced-traits.md +++ b/src/generics-traits/advanced-traits.md @@ -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 diff --git a/zh-CN/src/generics-traits/advanced-traits.md b/zh-CN/src/generics-traits/advanced-traits.md index 4533f3f..c5734d7 100644 --- a/zh-CN/src/generics-traits/advanced-traits.md +++ b/zh-CN/src/generics-traits/advanced-traits.md @@ -249,7 +249,7 @@ fn main() { 5. 🌟🌟 -```rust +```rust,editable use std::fmt; // 定义一个 newtype `Pretty`