Fix mutability of get_var

pull/3/head
trivernis 2 years ago
parent 06828e6266
commit 691f91efdf
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,6 +1,6 @@
[package] [package]
name = "embed-nu" name = "embed-nu"
version = "0.3.4" version = "0.3.5"
edition = "2021" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/Trivernis/embed-nu" repository = "https://github.com/Trivernis/embed-nu"

@ -55,7 +55,7 @@ impl Context {
} }
/// Returns a variable defined in the stack /// Returns a variable defined in the stack
pub fn get_var<S: AsRef<str>>(&mut self, name: S) -> Option<nu_protocol::Value> { pub fn get_var<S: AsRef<str>>(&self, name: S) -> Option<nu_protocol::Value> {
let name = name.as_ref(); let name = name.as_ref();
let dollar_name = format!("${name}"); let dollar_name = format!("${name}");
let var_id = self let var_id = self

Loading…
Cancel
Save