Skip to content
Snippets Groups Projects
Unverified Commit c32a1e76 authored by bgallois's avatar bgallois
Browse files

add generic constructor

parent ab7501c1
No related branches found
No related tags found
No related merge requests found
Pipeline #35132 passed
...@@ -24,8 +24,8 @@ impl Div<&MaxBlockWeight> for f64 { ...@@ -24,8 +24,8 @@ impl Div<&MaxBlockWeight> for f64 {
} }
} }
impl MaxBlockWeight { impl MaxBlockWeight {
pub fn new(value: f64) -> Self { pub fn new<T: Into<f64>>(value: T) -> Self {
MaxBlockWeight(value) MaxBlockWeight(value.into())
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment