From c32a1e760368403f3471868d5a96de747400399c Mon Sep 17 00:00:00 2001
From: bgallois <benjamin@gallois.cc>
Date: Thu, 4 Jan 2024 16:02:39 +0100
Subject: [PATCH] add generic constructor

---
 resources/weight_analyzer/src/lib.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/resources/weight_analyzer/src/lib.rs b/resources/weight_analyzer/src/lib.rs
index d4c3756d0..afc087928 100644
--- a/resources/weight_analyzer/src/lib.rs
+++ b/resources/weight_analyzer/src/lib.rs
@@ -24,8 +24,8 @@ impl Div<&MaxBlockWeight> for f64 {
     }
 }
 impl MaxBlockWeight {
-    pub fn new(value: f64) -> Self {
-        MaxBlockWeight(value)
+    pub fn new<T: Into<f64>>(value: T) -> Self {
+        MaxBlockWeight(value.into())
     }
 }
 
-- 
GitLab