aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/sloth_vm/src/sloth_std/misc.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/sloth_vm/src/sloth_std/misc.rs b/crates/sloth_vm/src/sloth_std/misc.rs
index 6994657..df8d452 100644
--- a/crates/sloth_vm/src/sloth_std/misc.rs
+++ b/crates/sloth_vm/src/sloth_std/misc.rs
@@ -17,13 +17,7 @@ fn get_doc(vm: &mut VM, args: &[Primitive]) -> NativeFunctionResult {
return Err(native::Error::InvalidArgument);
};
- let docs = NATIVE_LIBRARY
- .get(fnc.name)
- .ok_or(native::Error::InvalidArgument)?
- .doc
- .ok_or(native::Error::InvalidArgument)?
- .to_string();
-
+ let docs = fnc.doc.expect("Oopsie Poopsie the stringy no worky").to_string();
let object = Object::new(ObjectType::String(docs));
let ptr = vm.objects_mut().allocate(object);