From ce5a57e7fd6f6e9d8f5e84725df6c935644ef0cc Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Fri, 11 Aug 2017 07:36:23 -0600 Subject: [PATCH] Fix redox namespaces plugin --- src/shell/plugins/namespaces/redox.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/shell/plugins/namespaces/redox.rs b/src/shell/plugins/namespaces/redox.rs index 21336015..ec8fa4d0 100644 --- a/src/shell/plugins/namespaces/redox.rs +++ b/src/shell/plugins/namespaces/redox.rs @@ -1,16 +1,17 @@ +use fnv::FnvHashMap; + use types::Identifier; use super::NamespaceError; -pub struct StringNamespace {} +pub struct StringNamespace; impl StringNamespace { - pub fn new() -> Result<StringNamespace, NamespaceError> { Err(NamespaceError::FunctionMissing) } + pub fn new() -> Result<StringNamespace, NamespaceError> { Ok(StringNamespace) } pub fn execute(&self, function: Identifier) -> Result<Option<String>, NamespaceError> { Ok(None) } } pub fn collect() -> FnvHashMap<Identifier, StringNamespace> { eprintln!("ion: Redox doesn't support plugins yet"); - let mut hashmap = FnvHashMap::default(); - hashmap + FnvHashMap::default() } -- GitLab