File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -515,31 +515,36 @@ impl Vm {
515
515
self . stack . push ( value) ;
516
516
}
517
517
518
+ #[ track_caller]
518
519
fn pop_quantity ( & mut self ) -> Quantity {
519
520
match self . pop ( ) {
520
521
Value :: Quantity ( q) => q,
521
522
_ => panic ! ( "Expected quantity to be on the top of the stack" ) ,
522
523
}
523
524
}
524
525
526
+ #[ track_caller]
525
527
fn pop_bool ( & mut self ) -> bool {
526
528
self . pop ( ) . unsafe_as_bool ( )
527
529
}
528
530
531
+ #[ track_caller]
529
532
fn pop_datetime ( & mut self ) -> chrono:: DateTime < chrono:: Utc > {
530
533
match self . pop ( ) {
531
534
Value :: DateTime ( q, _) => q,
532
535
_ => panic ! ( "Expected datetime to be on the top of the stack" ) ,
533
536
}
534
537
}
535
538
539
+ #[ track_caller]
536
540
fn pop_string ( & mut self ) -> String {
537
541
match self . pop ( ) {
538
542
Value :: String ( s) => s,
539
543
_ => panic ! ( "Expected string to be on the top of the stack" ) ,
540
544
}
541
545
}
542
546
547
+ #[ track_caller]
543
548
fn pop ( & mut self ) -> Value {
544
549
self . stack . pop ( ) . expect ( "stack should not be empty" )
545
550
}
You can’t perform that action at this time.
0 commit comments