From 76478b37cdb0230b69ded3fa718c5bb0a888600a Mon Sep 17 00:00:00 2001 From: Rushmore Mushambi Date: Mon, 21 Aug 2023 14:48:31 +0200 Subject: [PATCH] impl IntoResource for &Thing (#2482) --- lib/src/api/opt/resource.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/api/opt/resource.rs b/lib/src/api/opt/resource.rs index f9875cb8..aefb9b0b 100644 --- a/lib/src/api/opt/resource.rs +++ b/lib/src/api/opt/resource.rs @@ -144,6 +144,12 @@ impl IntoResource> for Thing { } } +impl IntoResource> for &Thing { + fn into_resource(self) -> Result { + Ok(Resource::RecordId(self.clone())) + } +} + impl IntoResource> for (T, I) where T: Into,