remove dupes in get_commands/get_command_names (#3308)

This commit is contained in:
Darren Schroeder 2021-04-13 09:21:44 -05:00 committed by GitHub
parent e09e3b01d6
commit 005649b6fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,9 @@ impl Scope {
for frame in self.frames.lock().iter().rev() {
for (name, command) in frame.commands.iter() {
output.insert(name.clone(), command.signature());
if !output.contains_key(name) {
output.insert(name.clone(), command.signature());
}
}
}
@ -120,8 +122,8 @@ impl Scope {
names.append(&mut frame_command_names);
}
names.dedup();
names.sort();
names.dedup();
names
}