From ab71e9a5497afe0027cae429d23e1571d1e139fe Mon Sep 17 00:00:00 2001 From: Rupesh-Darimisetti <49586865+Rupesh-Darimisetti@users.noreply.github.com> Date: Mon, 8 Aug 2022 20:40:59 +0530 Subject: [PATCH] fix: make the exercise editable to run --- en/src/lifetime/advance.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/src/lifetime/advance.md b/en/src/lifetime/advance.md index a11fb1a..a4af1a2 100644 --- a/en/src/lifetime/advance.md +++ b/en/src/lifetime/advance.md @@ -101,7 +101,7 @@ and could then be used to compare a `&'a T` with any lifetime to an `i32`. Only a higher-ranked bound can be used here, because the lifetime of the reference is shorter than any possible lifetime parameter on the function。 4γ€πŸŒŸπŸŒŸπŸŒŸ -```rust +```rust,editable /* Adding HRTB to make it work!*/ fn call_on_ref_zero<'a, F>(f: F) where F: Fn(&'a i32) { let zero = 0; @@ -236,7 +236,7 @@ struct Ref<'a, T> { ## A difficult exercise 6γ€πŸŒŸπŸŒŸπŸŒŸπŸŒŸ -```rust +```rust,editable /* Make it work */ struct Interface<'a> { manager: &'a mut Manager<'a> @@ -281,4 +281,4 @@ fn main() { fn use_list(list: &List) { println!("{}", list.manager.text); } -``` \ No newline at end of file +```