mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
make vars-by-symbol a vector
This commit is contained in:
parent
d4cce420a8
commit
19d7f7ce09
3 changed files with 10 additions and 8 deletions
|
@ -84,11 +84,11 @@ pub struct Env {
|
|||
}
|
||||
|
||||
impl Env {
|
||||
pub fn vars_by_symbol(&self) -> MutMap<Symbol, Variable> {
|
||||
pub fn vars_by_symbol(&self) -> impl Iterator<Item = (Symbol, Variable)> + '_ {
|
||||
let it1 = self.symbols.iter().copied();
|
||||
let it2 = self.variables.iter().copied();
|
||||
|
||||
it1.zip(it2).collect()
|
||||
it1.zip(it2)
|
||||
}
|
||||
|
||||
fn get_var_by_symbol(&self, symbol: &Symbol) -> Option<Variable> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue