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
This works correctly:
#[derive(derive_more::Display)] #[display("x{}", self.command())] enum Foo { Y, } impl Foo { fn command(&self) -> &'static str { "AAAAAA" } } #[test] fn test() { assert_eq!("xAAAAAA", Foo::Y.to_string()); }
Now get rid of x prefix:
x
#[derive(derive_more::Display)] #[display("{}", self.command())] enum Foo { Y, } impl Foo { fn command(&self) -> &'static str { "AAAAAA" } } #[test] fn test() { assert_eq!("AAAAAA", Foo::Y.to_string()); }
Now test fails:
assertion `left == right` failed left: "AAAAAA" right: "Y"
Version 1.0.0.
The text was updated successfully, but these errors were encountered:
@stepancheg this should already be fixed by #395 (at least the similar case is covered in tests, and I've also re-check your example on latest master), and will be released in 2.0.0 (hopefully, soon, since it's only #440 left to cut it).
master
Sorry, something went wrong.
tyranron
Successfully merging a pull request may close this issue.
This works correctly:
Now get rid of
x
prefix:Now test fails:
Version 1.0.0.
The text was updated successfully, but these errors were encountered: