From 002be121020d3883ac8e986ecb8e30d8ca5ae0a2 Mon Sep 17 00:00:00 2001 From: parrrate Date: Fri, 30 Aug 2024 16:18:16 +0000 Subject: [PATCH] ungrey second part of Linked --- src/exercises/linked.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/exercises/linked.md b/src/exercises/linked.md index 59e45b5..2953a7f 100644 --- a/src/exercises/linked.md +++ b/src/exercises/linked.md @@ -44,11 +44,14 @@ impl<'a, F: FnMut(String)> Linked<'a, F> { let mut value = node.value.to_string(); while let Some(next) = node.next { value += next.value; -# /* +# impl<'a, F: FnMut(String)> Linked<'a, F> { fn ___(&mut self) { trait Callback { fn callback(&mut self, value: String); } +# impl<'a, F: FnMut(String)> Callback for Linked<'a, F> { fn callback(&mut self, value: String) { (self.callback)(value); } } +# { let mut node = 1; let next = 2; node = next; } +# let value = unimplemented!(); self.callback(value); -# */ +# } } # node = *next; } # (self.callback)(value); }