You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes it more ergonomic to connect to redap.
Also: use more idiomatic `FromStr` instead of `TryFrom<&str>`. I've
opened a clippy lint about this:
rust-lang/rust-clippy#14522
Review each commit seperately.
Uh oh!
There was an error while loading. Please reload this page.
What it does
Looks for
impl TryFrom<&str>
and suggestimpl FromStr
insteadAdvantage
When parsing a string,
FromStr
is the idiomatic trait to implement, but that may not be immediately obvious to a Rust novice.From the docs of
TryFrom
:Parsing is something else completely, and for that
trait FromStr
is to be used.See also @kangalio's comment on the inverse issue.
Drawbacks
If there is a lifetime on the type, then
FromStr
won't work, and so we should not make the suggestion in that cade.Example
Could be written as:
The text was updated successfully, but these errors were encountered: