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
Something like the former would be expected to work, but because of the issue, Foo would be required to implement Display as well. This is unnecessary in most cases, so removing that line would make this library easier to use.
Here is the error the compiler gives;
error[E0277]: `Foo` doesn't implement `std::fmt::Display`
--> src\main.rs:106:20
|
106 | let foo:Foo = read!();
| ^^^^^^^ `Foo` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `Foo`
= note:in format strings you may be able to use `{:?}` (or {:#?}for pretty-print) instead
= note: this error originates in the macro `format_args` which comes from the expansion of the macro `read` (in Nightly builds, run with -Z macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
Because
try_scan!
has the following linean implementation of
Display
is mandatory for any type that you want to convert to.Example:
Something like the former would be expected to work, but because of the issue,
Foo
would be required to implementDisplay
as well. This is unnecessary in most cases, so removing that line would make this library easier to use.Here is the error the compiler gives;
The text was updated successfully, but these errors were encountered: