From 0c3e8d5edfe382d1576d54d2589c2492d1740067 Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 28 Aug 2024 12:06:25 -0400 Subject: [PATCH] Clean up --- dust-lang/src/value.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dust-lang/src/value.rs b/dust-lang/src/value.rs index 3963eb2..c6827cb 100644 --- a/dust-lang/src/value.rs +++ b/dust-lang/src/value.rs @@ -167,10 +167,15 @@ impl Value { } pub fn is_raw(&self) -> bool { - match self { - Value::Raw(_) => true, - _ => false, - } + matches!(self, Value::Raw(_)) + } + + pub fn is_reference(&self) -> bool { + matches!(self, Value::Reference(_)) + } + + pub fn is_mutable(&self) -> bool { + matches!(self, Value::Mutable(_)) } pub fn as_mutable(&self) -> Option<&Arc>> {