diff --git a/src/roblox/reflection/mod.rs b/src/roblox/reflection/mod.rs index f8db49a..3b59200 100644 --- a/src/roblox/reflection/mod.rs +++ b/src/roblox/reflection/mod.rs @@ -31,7 +31,7 @@ impl Database { Creates a new database struct, referencing the bundled reflection database. */ pub fn new() -> Self { - Self(rbx_reflection_database::get()) + Self::default() } /** @@ -125,6 +125,12 @@ impl LuaUserData for Database { } } +impl Default for Database { + fn default() -> Self { + Self(rbx_reflection_database::get()) + } +} + impl PartialEq for Database { fn eq(&self, _other: &Self) -> bool { true // All database userdatas refer to the same underlying rbx-dom database