Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
//! impl TryFrom<&str> for Numbers {
//! type Error = String;
//!
//! fn try_from(s: &str) -> Result<Self, Self::Error> {
//! fn try_from(s: &str) -> std::result::Result<Self, Self::Error> {
//! match s {
//! "One" => Ok(Self::One),
//! "Two" => Ok(Self::Two),
Expand All @@ -190,15 +190,15 @@
//! impl TryFrom<String> for Numbers {
//! type Error = String;
//!
//! fn try_from(s: String) -> Result<Self, Self::Error> {
//! fn try_from(s: String) -> std::result::Result<Self, Self::Error> {
//! s.as_str().try_into()
//! }
//! }
//!
//! impl ::std::str::FromStr for Numbers {
//! type Err = String;
//!
//! fn from_str(s: &str) -> Result<Self, Self::Err> {
//! fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
//! s.try_into()
//! }
//! }
Expand Down Expand Up @@ -269,7 +269,7 @@ fn impl_try_from_str(
impl TryFrom<&str> for #name {
type Error = String;

fn try_from(s: &str) -> Result<Self, Self::Error> {
fn try_from(s: &str) -> std::result::Result<Self, Self::Error> {
match s {
#(#names => Ok(Self::#identifiers),)*
_ => Err(format!("Failed to parse string '{}' for enum {}", s, stringify!(#name))),
Expand All @@ -286,7 +286,7 @@ fn impl_try_from_string(name: &syn::Ident) -> TokenStream {
impl TryFrom<String> for #name {
type Error = String;

fn try_from(s: String) -> Result<Self, Self::Error> {
fn try_from(s: String) -> std::result::Result<Self, Self::Error> {
s.as_str().try_into()
}
}
Expand All @@ -300,7 +300,7 @@ fn impl_from_str(name: &syn::Ident) -> TokenStream {
impl ::std::str::FromStr for #name {
type Err = String;

fn from_str(s: &str) -> Result<Self, Self::Err> {
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
s.try_into()
}
}
Expand Down
Loading