From 8e1094e043d04ea1d029c9096c0a1afb6f83a8e0 Mon Sep 17 00:00:00 2001 From: ItsEthra <107059409+ItsEthra@users.noreply.github.com> Date: Sun, 3 Dec 2023 21:48:16 +0300 Subject: [PATCH] Generalized response impls --- src/responders.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/responders.rs b/src/responders.rs index 67b5019..20a6160 100644 --- a/src/responders.rs +++ b/src/responders.rs @@ -211,9 +211,9 @@ impl IntoResponseParts for HxRetarget { } } -impl From for HxRetarget { - fn from(value: String) -> Self { - Self(value) +impl> From for HxRetarget { + fn from(value: T) -> Self { + Self(value.into()) } } @@ -240,9 +240,9 @@ impl IntoResponseParts for HxReselect { } } -impl From for HxReselect { - fn from(value: String) -> Self { - Self(value) +impl> From for HxReselect { + fn from(value: T) -> Self { + Self(value.into()) } }