We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Similar CodeAction Generate `From` impl for this enum variant
Generate `From` impl for this enum variant
struct Foo(String); struct Bar { inner: String, } // repr(transparent) bound struct Baz { inner: String, _phantom: core::marker::PhantomData<()>, _pinned: core::marker::PhantomPinned, _zero_size_align_1: (), }
Generate:
impl From<String> for Foo { fn from(value: String) -> Self { Self(value) } } impl From<String> for Bar { fn from(inner: String) -> Self { Self { inner } } } impl From<String> for Baz { fn from(inner: String) -> Self { Self { inner, _phantom: core::marker::PhantomData, _pinned: core::marker::PhantomPinned, _zero_size_align_1: (), } } }
Consider going further:
struct Pack(Option<String>);
impl From<String> for Pack { fn from(value: String) -> Self { Self(Some(value)) } }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Similar CodeAction
Generate `From` impl for this enum variant
Generate:
Consider going further:
Generate:
The text was updated successfully, but these errors were encountered: