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:
Michael Angerman
2021-02-23 01:21:31 -08:00
committed by GitHub
parent 2c89a228d5
commit e834e617f3
4 changed files with 0 additions and 186 deletions

View File

@ -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),
// })
// }
// }