From 41fa4d556a8a8240f09945e76e2b16fc31a1db43 Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Mon, 10 Oct 2016 00:08:20 +0200 Subject: [PATCH] fixed highlighting --- patterns/compose-structs.md | 2 +- patterns/newtype.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/patterns/compose-structs.md b/patterns/compose-structs.md index 7f29365..449fdc3 100644 --- a/patterns/compose-structs.md +++ b/patterns/compose-structs.md @@ -41,7 +41,7 @@ fn main(a: &mut A) { We can apply this design pattern and refactor `A` into two smaller structs, thus solving the borrow checking issue: -``` +```rust // A is now composed of two structs - B and C. struct A { b: B, diff --git a/patterns/newtype.md b/patterns/newtype.md index 94ae504..b6b179f 100644 --- a/patterns/newtype.md +++ b/patterns/newtype.md @@ -7,7 +7,7 @@ This creates a new type, rather than an alias to a type (`type` items). ## Example -``` +```rust // Some type, not necessarily in the same module or even crate. struct Foo { ... @@ -80,7 +80,7 @@ most common uses, but they can be used for other reasons: * making a type with copy semantics have move semantics, * abstraction by providing a more concrete type and thus hiding internal types, e.g., -``` +```rust pub struct Foo(Bar); ```