This commit is contained in:
parent
9ec8ad0250
commit
d195b4927b
@ -15,12 +15,20 @@ struct Linked<'a, F> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, F: FnMut(String)> Linked<'a, F> {
|
impl<'a, F: FnMut(String)> Linked<'a, F> {
|
||||||
# /*
|
# fn __() {
|
||||||
|
# mod __ {
|
||||||
|
# struct Node<'a> { next: Option<Box<Self>>, value: &'a str }
|
||||||
|
# struct Linked<'a, F> { node: Box<Node<'a>>, callback: &'a mut F }
|
||||||
|
# impl<F> Linked<'_, F> {
|
||||||
fn with(&mut self, value: &str) -> Linked<'_, F> {
|
fn with(&mut self, value: &str) -> Linked<'_, F> {
|
||||||
|
# unimplemented!() } fn with2(self) { let _ =
|
||||||
Self {
|
Self {
|
||||||
node: Node {
|
node: Node {
|
||||||
next: Some(self.node),
|
next: Some(self.node),
|
||||||
# */
|
# value: unimplemented!(),
|
||||||
|
# }.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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user