Skip to content

Commit

Permalink
One more thing converted to CompactString
Browse files Browse the repository at this point in the history
  • Loading branch information
rben01 committed Oct 12, 2024
1 parent ca9a946 commit 6dade3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions numbat/src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use crate::{
pub use crate::markup as m;

use assert_eq_3::AssertEq3Error;
use compact_str::{CompactString, ToCompactString};
use thiserror::Error;

pub use crate::value::Value;
Expand Down Expand Up @@ -127,10 +128,10 @@ impl InterpreterResult {
matches!(self, Self::Continue)
}

pub fn value_as_string(&self) -> Option<String> {
pub fn value_as_string(&self) -> Option<CompactString> {
match self {
Self::Continue => None,
Self::Value(value) => Some(value.to_string()),
Self::Value(value) => Some(value.to_compact_string()),
}
}
}
Expand Down

0 comments on commit 6dade3e

Please sign in to comment.