more efficient tracebacks
Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
parent
8f0e2512cc
commit
9796c20c5d
2 changed files with 6 additions and 7 deletions
|
|
@ -35,10 +35,9 @@ impl Traceback {
|
|||
Traceback(vec![])
|
||||
}
|
||||
|
||||
pub fn with_trace(&self, item: TraceItem) -> Traceback {
|
||||
let mut next = Traceback(self.0.clone());
|
||||
next.0.push(item);
|
||||
next
|
||||
pub fn with_trace(mut self, item: TraceItem) -> Traceback {
|
||||
self.0.push(item);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn depth(&self) -> usize {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue