slim down interfact even more

pull/8675/merge^2
mattwparas 1 year ago
parent 7d63468b83
commit 0eb0be55a3

@ -551,12 +551,6 @@ impl std::str::FromStr for MappableCommand {
args,
doc,
})
} else if self::engine::ScriptingEngine::is_exported(name) {
Some(MappableCommand::Typable {
name: name.to_owned(),
args,
doc: "plugin function".to_string(),
})
} else {
None
}

@ -99,10 +99,6 @@ impl ScriptingEngine {
) -> Vec<(String, i64)> {
PLUGIN_SYSTEM.0.fuzzy_match(fuzzy_matcher, input)
}
pub fn is_exported(ident: &str) -> bool {
PLUGIN_SYSTEM.0.is_exported(ident)
}
}
impl PluginSystem for NoEngine {}
@ -174,9 +170,4 @@ pub trait PluginSystem {
) -> Vec<(String, i64)> {
Vec::new()
}
/// Checks if this identifier is available in the global environment in the engine.
fn is_exported(&self, _ident: &str) -> bool {
false
}
}

@ -345,7 +345,9 @@ impl super::PluginSystem for SteelScriptingEngine {
.map(|x| (x.0.to_string(), x.1))
.collect::<Vec<_>>()
}
}
impl SteelScriptingEngine {
fn is_exported(&self, ident: &str) -> bool {
EXPORTED_IDENTIFIERS
.identifiers
@ -353,9 +355,7 @@ impl super::PluginSystem for SteelScriptingEngine {
.unwrap()
.contains(ident)
}
}
impl SteelScriptingEngine {
// Attempt to fetch the keymap for the extension
fn get_keymap_for_extension<'a>(cx: &'a mut Context) -> Option<SteelVal> {
// Get the currently activated extension, also need to check the

Loading…
Cancel
Save