mirror of
https://github.com/danog/strum.git
synced 2024-11-26 20:14:40 +01:00
Use core::* instead of std::* in order to make it work in a no_std environment. (#192)
Co-authored-by: Danny Milosavljevic <daym@oxidecomputer.com>
This commit is contained in:
parent
5272fcea91
commit
5c0ee93860
@ -134,10 +134,10 @@ fn try_from_str(
|
||||
) -> TokenStream {
|
||||
quote! {
|
||||
#[allow(clippy::use_self)]
|
||||
impl #impl_generics ::std::convert::TryFrom<&str> for #name #ty_generics #where_clause {
|
||||
impl #impl_generics ::core::convert::TryFrom<&str> for #name #ty_generics #where_clause {
|
||||
type Error = #strum_module_path::ParseError;
|
||||
fn try_from(s: &str) -> ::std::result::Result< #name #ty_generics , Self::Error> {
|
||||
::std::str::FromStr::from_str(s)
|
||||
fn try_from(s: &str) -> ::core::result::Result< #name #ty_generics , Self::Error> {
|
||||
::core::str::FromStr::from_str(s)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user