We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In fourth.rs, my cargo, (edition = "2018"), wants Node prev and next Boxed. It was not too hard to make it work. How about printing? Something like:
impl<T: std::fmt::Display> fmt::Display for List<T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut rc_str = String::from("("); let mut cur_link = &self.head; let mut start = true; while let Some(boxed_node) = cur_link { if start { } else { rc_str.push_str(", "); } start = false; rc_str.push_str(&format!("{}", boxed_node.elem)); cur_link = &boxed_node.next; } rc_str.push_str(")"); write!(f, "{}", rc_str) } }
The text was updated successfully, but these errors were encountered:
Improved code formatting.
Sorry, something went wrong.
No branches or pull requests
In fourth.rs, my cargo, (edition = "2018"), wants Node prev and next Boxed. It was not too hard to make it work.
How about printing? Something like:
The text was updated successfully, but these errors were encountered: