From 541196de37f92ef0eb25460c10a37615cb2055f8 Mon Sep 17 00:00:00 2001 From: amab8901 <83634595+amab8901@users.noreply.github.com> Date: Fri, 21 Oct 2022 16:49:31 +0200 Subject: [PATCH] Functions `a` and `b` are unused. Silence the lint. --- src/04_pinning/01_chapter.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/04_pinning/01_chapter.md b/src/04_pinning/01_chapter.md index d8ea5dad..73e8554c 100644 --- a/src/04_pinning/01_chapter.md +++ b/src/04_pinning/01_chapter.md @@ -533,10 +533,12 @@ The type system prevents us from moving the data. > # this.b = self_ptr; > # } > # +> # #[allow(unused)] > # fn a<'a>(self: Pin<&'a Self>) -> &'a str { > # &self.get_ref().a > # } > # +> # #[allow(unused)] > # fn b<'a>(self: Pin<&'a Self>) -> &'a String { > # assert!(!self.b.is_null(), "Test::b called without Test::init being called first"); > # unsafe { &*(self.b) }