Skip to content

Commit

Permalink
Fix doc tests, vol.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Aug 30, 2024
1 parent febdcca commit 0696a13
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions impl/doc/from_str.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Code like this will be generated:

```rust
# struct MyInt(i32);
impl derive_more::FromStr for MyInt {
type Err = <i32 as derive_more::FromStr>::Err;
impl derive_more::core::str::FromStr for MyInt {
type Err = <i32 as derive_more::core::str::FromStr>::Err;
fn from_str(src: &str) -> Result<Self, Self::Err> {
return Ok(MyInt(i32::from_str(src)?));
}
Expand Down Expand Up @@ -74,8 +74,8 @@ Code like this will be generated:
# struct Point1D {
# x: i32,
# }
impl derive_more::FromStr for Point1D {
type Err = <i32 as derive_more::FromStr>::Err;
impl derive_more::core::str::FromStr for Point1D {
type Err = <i32 as derive_more::core::str::FromStr>::Err;
fn from_str(src: &str) -> Result<Self, Self::Err> {
return Ok(Point1D {
x: i32::from_str(src)?,
Expand Down Expand Up @@ -121,8 +121,8 @@ Code like this will be generated:
# Baz,
# }
#
impl derive_more::FromStr for EnumNoFields {
type Err = derive_more::FromStrError;
impl derive_more::core::str::FromStr for EnumNoFields {
type Err = derive_more::core::str::FromStrError;
fn from_str(src: &str) -> Result<Self, Self::Err> {
Ok(match src.to_lowercase().as_str() {
"foo" => EnumNoFields::Foo,
Expand Down

0 comments on commit 0696a13

Please sign in to comment.