Add test for constants to Scope::get_mut.

This commit is contained in:
Stephen Chung 2021-09-18 10:14:54 +08:00
parent c231646197
commit 5d47ebf57a

View File

@ -397,6 +397,9 @@ impl<'a> Scope<'a> {
/// *ptr = 123_i64.into(); /// *ptr = 123_i64.into();
/// ///
/// assert_eq!(my_scope.get_value::<i64>("x").unwrap(), 123); /// assert_eq!(my_scope.get_value::<i64>("x").unwrap(), 123);
///
/// my_scope.push_constant("Z", 1_i64);
/// assert!(my_scope.get_mut("Z").is_none());
/// ``` /// ```
#[inline] #[inline]
#[must_use] #[must_use]