Skip to content

Commit

Permalink
fix: str
Browse files Browse the repository at this point in the history
  • Loading branch information
katopz committed Apr 11, 2024
1 parent 89eeac0 commit ccfa076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rust/r3/create-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn hello(foo: String) -> String
fn hello(foo: &str) -> Cow<'_, str>

// Take impl, return impl.
fn hello(foo: impl AsRef<Str>) -> impl AsRef<str>
fn hello(foo: impl AsRef<str>) -> impl AsRef<str>
```

> 💡 You can read more about `Cow` here 👉 [6 things you can do with the Cow 🐄 in Rust 🦀](https://dev.to/kgrech/6-things-you-can-do-with-the-cow-in-rust-4l55)

0 comments on commit ccfa076

Please sign in to comment.