fix: remove unnecessary string & vec allocations

This commit is contained in:
Euan Lacy
2022-05-10 17:54:15 +01:00
parent aaa75c3ffc
commit c2a87f898e
3 changed files with 31 additions and 60 deletions

View File

@@ -14,6 +14,7 @@ use crate::types::*;
use fxhash::FxBuildHasher;
use indexmap::IndexSet;
use rustyline::error::ReadlineError;
use rustyline::{Config, Editor};
@@ -108,7 +109,7 @@ impl ReadlineStream {
}
}
pub fn set_atoms_for_completion(&mut self, atoms: Vec<String>) {
pub fn set_atoms_for_completion(&mut self, atoms: *const IndexSet<Atom>) {
let helper = self.rl.helper_mut().unwrap();
helper.atoms = atoms;
}