diff --git a/src/module/mod.rs b/src/module/mod.rs index 976a554b..1b1051af 100644 --- a/src/module/mod.rs +++ b/src/module/mod.rs @@ -423,15 +423,15 @@ impl Module { /// ``` /// # use rhai::Module; /// #[derive(Clone)] - /// struct TestStruct {} + /// struct TestStruct; /// - /// let name = std::any::type_name::of::()); + /// let name = std::any::type_name::(); /// /// let mut module = Module::new(); /// - /// module.set_custom_type("MyType"); + /// module.set_custom_type::("MyType"); /// - /// assert_eq!(module.get_custom_type(name, Some("MyType")); + /// assert_eq!(module.get_custom_type(name), Some("MyType")); /// ``` #[inline(always)] pub fn set_custom_type(&mut self, name: &str) -> &mut Self { @@ -443,15 +443,15 @@ impl Module { /// ``` /// # use rhai::Module; /// #[derive(Clone)] - /// struct TestStruct {} + /// struct TestStruct; /// - /// let name = std::any::type_name::of::()); + /// let name = std::any::type_name::(); /// /// let mut module = Module::new(); /// /// module.set_custom_type_raw(name, "MyType"); /// - /// assert_eq!(module.get_custom_type(name, Some("MyType")); + /// assert_eq!(module.get_custom_type(name), Some("MyType")); /// ``` #[inline(always)] pub fn set_custom_type_raw( @@ -469,15 +469,15 @@ impl Module { /// ``` /// # use rhai::Module; /// #[derive(Clone)] - /// struct TestStruct {} + /// struct TestStruct; /// - /// let name = std::any::type_name::of::()); + /// let name = std::any::type_name::(); /// /// let mut module = Module::new(); /// - /// module.set_custom_type("MyType"); + /// module.set_custom_type::("MyType"); /// - /// assert_eq!(module.get_custom_type(name, Some("MyType")); + /// assert_eq!(module.get_custom_type(name), Some("MyType")); /// ``` #[inline(always)] pub fn get_custom_type(&self, key: &str) -> Option<&str> {