Doubly-linked list/Element insertion: Difference between revisions
Content added Content deleted
Line 951: | Line 951: | ||
=={{header|Rust}}== |
=={{header|Rust}}== |
||
=== Simply using the standard library === |
|||
<lang rust>use std::collections::LinkedList; |
|||
fn main() { |
|||
let mut list = LinkedList::new(); |
|||
list.push(8); |
|||
}</lang> |
|||
=== The behind-the-scenes implementation === |
|||
This expands upon the implementation defined in [[Doubly-linked list/Element definition#Rust]] and consists of the relevant lines from the LinkedList implementation in the Rust standard library. |
This expands upon the implementation defined in [[Doubly-linked list/Element definition#Rust]] and consists of the relevant lines from the LinkedList implementation in the Rust standard library. |
||