MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / new

Method new

contents/stacks_and_queues/code/rust/Queue.rs:8–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7impl<T> Queue<T> {
8 fn new() -> Self {
9 Queue{
10 list: VecDeque::new(),
11 }
12 }
13
14 // Note that this returns a reference to the value
15 // This is in contrast to dequeue which gives ownership of the value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected