From 78c23507c9a86fae0d7f9f6eb4b79ade1c00829a Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Wed, 9 Aug 2023 16:32:17 -0500 Subject: [PATCH] Fix clippy complaining about default trait --- src/roblox/reflection/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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