more compact Linked hidden

This commit is contained in:
AF 2026-04-09 12:56:18 +00:00
parent 6b0eff8cab
commit bd54f8199b
Signed by: alisa
SSH Key Fingerprint: SHA256:vNY4pdIZvO1FYJKHROkdHLtvyopizvZVAEwg9AF6h04

View File

@ -15,8 +15,7 @@ struct Linked<'a, F> {
} }
impl<'a, F: FnMut(String)> Linked<'a, F> { impl<'a, F: FnMut(String)> Linked<'a, F> {
# fn __() { # fn __() { mod __ {
# mod __ {
# struct Node<'a> { next: Option<Box<Self>>, value: &'a str } # struct Node<'a> { next: Option<Box<Self>>, value: &'a str }
# struct Linked<'a, F> { node: Box<Node<'a>>, callback: &'a mut F } # struct Linked<'a, F> { node: Box<Node<'a>>, callback: &'a mut F }
# impl<F> Linked<'_, F> { # impl<F> Linked<'_, F> {
@ -25,10 +24,7 @@ impl<'a, F: FnMut(String)> Linked<'a, F> {
Self { Self {
node: Node { node: Node {
next: Some(self.node), next: Some(self.node),
# value: unimplemented!(), # value: unimplemented!(), }.into(), callback: self.callback, }; } } } }
# }.into(),
# callback: self.callback,
# }; } } } }
# fn with<'b>(&'b mut self, value: &'b str) -> Linked<'b, F> { # fn with<'b>(&'b mut self, value: &'b str) -> Linked<'b, F> {
# Linked { # Linked {
# node: Node { # node: Node {