Skip to content

Commit 509d4ad

Browse files
committed
wrapper: fix FromStr implementation
1 parent 91f5044 commit 509d4ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ pub fn derive_wrapper(input: TokenStream) -> TokenStream {
832832
/// Display
833833
/// )]
834834
/// #[display(inner)]
835-
/// #[wrapper(NumberFmt, MathOps, BoolOps)]
835+
/// #[wrapper(NumberFmt, MathOps, BoolOps, FromStr)]
836836
/// #[wrapper_mut(MathAssign, BitAssign)]
837837
/// struct Int64(i64);
838838
/// ```

src/wrapper.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl Wrapper {
269269
#[inline]
270270
fn from_str(s: &str) -> Result<Self, Self::Err> {
271271
use ::core::str::FromStr;
272-
FromStr::from_str(s).map(Self::from)
272+
<#from as FromStr>::from_str(s).map(Self::from)
273273
}
274274
}
275275
},

0 commit comments

Comments
 (0)