Allow NU_LIBS_DIR and friends to be const (#8538)

This commit is contained in:
StevenDoesStuffs
2023-04-05 11:56:48 -05:00
committed by GitHub
parent d18cf19a3f
commit 1134c2f16c
13 changed files with 279 additions and 136 deletions

View File

@ -39,7 +39,7 @@ pub trait CallExt {
&self,
engine_state: &EngineState,
stack: &mut Stack,
pos: usize,
name: &str,
) -> Result<T, ShellError>;
}
@ -111,9 +111,9 @@ impl CallExt for Call {
&self,
engine_state: &EngineState,
stack: &mut Stack,
pos: usize,
name: &str,
) -> Result<T, ShellError> {
if let Some(expr) = self.parser_info_nth(pos) {
if let Some(expr) = self.get_parser_info(name) {
let result = eval_expression(engine_state, stack, expr)?;
FromValue::from_value(&result)
} else if self.parser_info.is_empty() {