mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 05:34:58 +02:00
Remove parking_lot crate reference from nu-data (#3091)
* remove parking_lot crate from nu-data as it is no longer being used * remove commented out code from parse.rs * remove commented out code from scope.rs
This commit is contained in:
@ -296,86 +296,3 @@ impl ScopeFrame {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// impl Scope {
|
||||
// pub fn vars(&self) -> IndexMap<String, Value> {
|
||||
// //FIXME: should this be an iterator?
|
||||
|
||||
// let mut output = IndexMap::new();
|
||||
|
||||
// for v in &self.vars {
|
||||
// output.insert(v.0.clone(), v.1.clone());
|
||||
// }
|
||||
|
||||
// if let Some(parent) = &self.parent {
|
||||
// for v in parent.vars() {
|
||||
// if !output.contains_key(&v.0) {
|
||||
// output.insert(v.0.clone(), v.1.clone());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// output
|
||||
// }
|
||||
|
||||
// pub fn env(&self) -> IndexMap<String, String> {
|
||||
// //FIXME: should this be an iterator?
|
||||
|
||||
// let mut output = IndexMap::new();
|
||||
|
||||
// for v in &self.env {
|
||||
// output.insert(v.0.clone(), v.1.clone());
|
||||
// }
|
||||
|
||||
// if let Some(parent) = &self.parent {
|
||||
// for v in parent.env() {
|
||||
// if !output.contains_key(&v.0) {
|
||||
// output.insert(v.0.clone(), v.1.clone());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// output
|
||||
// }
|
||||
|
||||
// pub fn var(&self, name: &str) -> Option<Value> {
|
||||
// if let Some(value) = self.vars().get(name) {
|
||||
// Some(value.clone())
|
||||
// } else {
|
||||
// None
|
||||
// }
|
||||
// }
|
||||
|
||||
// pub fn append_var(this: Arc<Self>, name: impl Into<String>, value: Value) -> Arc<Scope> {
|
||||
// let mut vars = IndexMap::new();
|
||||
// vars.insert(name.into(), value);
|
||||
// Arc::new(Scope {
|
||||
// vars,
|
||||
// env: IndexMap::new(),
|
||||
// commands: IndexMap::new(),
|
||||
// aliases: IndexMap::new(),
|
||||
// parent: Some(this),
|
||||
// })
|
||||
// }
|
||||
|
||||
// pub fn append_vars(this: Arc<Self>, vars: IndexMap<String, Value>) -> Arc<Scope> {
|
||||
// Arc::new(Scope {
|
||||
// vars,
|
||||
// env: IndexMap::new(),
|
||||
// commands: IndexMap::new(),
|
||||
// aliases: IndexMap::new(),
|
||||
// parent: Some(this),
|
||||
// })
|
||||
// }
|
||||
|
||||
// pub fn append_env(this: Arc<Self>, env: IndexMap<String, String>) -> Arc<Scope> {
|
||||
// Arc::new(Scope {
|
||||
// vars: IndexMap::new(),
|
||||
// env,
|
||||
// commands: IndexMap::new(),
|
||||
// aliases: IndexMap::new(),
|
||||
// parent: Some(this),
|
||||
// })
|
||||
// }
|
||||
|
||||
// }
|
||||
|
Reference in New Issue
Block a user