From 5d47ebf57a2bcb956396e377afb2b55804ed0d82 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sat, 18 Sep 2021 10:14:54 +0800 Subject: [PATCH] Add test for constants to Scope::get_mut. --- src/scope.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scope.rs b/src/scope.rs index 823d640d..73934593 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -397,6 +397,9 @@ impl<'a> Scope<'a> { /// *ptr = 123_i64.into(); /// /// assert_eq!(my_scope.get_value::("x").unwrap(), 123); + /// + /// my_scope.push_constant("Z", 1_i64); + /// assert!(my_scope.get_mut("Z").is_none()); /// ``` #[inline] #[must_use]