We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
if let
.map()
1 parent cd444ca commit ecb85f0Copy full SHA for ecb85f0
library/alloc/src/sync.rs
@@ -588,9 +588,11 @@ impl<T> Arc<T> {
588
/// // manual `Drop` implementation that does the destruction in a loop:
589
/// impl<T> Drop for LinkedList<T> {
590
/// fn drop(&mut self) {
591
- /// let mut x = self.0.take();
592
- /// while let Some(arc) = x.take() {
593
- /// Arc::into_inner(arc).map(|node| x = node.1);
+ /// let mut link = self.0.take();
+ /// while let Some(arc_node) = link.take() {
+ /// if let Some(Node(_value, next)) = Arc::into_inner(arc_node) {
594
+ /// link = next;
595
+ /// }
596
/// }
597
598
0 commit comments