forked from extern/nushell
Clippy fixes for toolchain bump (#13497)
- **Suggested default impl for the new `*Stack`s** - **Change a hashmap to make clippy happy** - **Clone from fix** - **Fix conditional unused in test** - then **Bump rust toolchain**
This commit is contained in:
committed by
GitHub
parent
d2bf82d22b
commit
813aac89bd
@ -71,7 +71,7 @@ impl Argument {
|
||||
}
|
||||
|
||||
/// Stores the argument context for calls in IR evaluation.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct ArgumentStack {
|
||||
arguments: Vec<Argument>,
|
||||
}
|
||||
|
@ -428,13 +428,13 @@ impl EngineState {
|
||||
.1
|
||||
}
|
||||
|
||||
pub fn render_env_vars(&self) -> HashMap<&String, &Value> {
|
||||
let mut result = HashMap::new();
|
||||
pub fn render_env_vars(&self) -> HashMap<&str, &Value> {
|
||||
let mut result: HashMap<&str, &Value> = HashMap::new();
|
||||
|
||||
for overlay_name in self.active_overlay_names(&[]) {
|
||||
let name = String::from_utf8_lossy(overlay_name);
|
||||
if let Some(env_vars) = self.env_vars.get(name.as_ref()) {
|
||||
result.extend(env_vars);
|
||||
result.extend(env_vars.iter().map(|(k, v)| (k.as_str(), v)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ pub struct ErrorHandler {
|
||||
}
|
||||
|
||||
/// Keeps track of error handlers pushed during evaluation of an IR block.
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct ErrorHandlerStack {
|
||||
handlers: Vec<ErrorHandler>,
|
||||
}
|
||||
|
Reference in New Issue
Block a user