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
> cargo check
Checking rust-codesnap v0.1.0 (C:\development\rust-codesnap)
error[E0277]: the trait bound `Code: From<&str>` is not satisfied
--> src/main.rs:5:15
|
5 | .code("fn main() { println!(\"Hello, world!\"); }")
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<&str>` is not implemented for `Code`, which is required by `&str: Into<Code>`
| |
| required by a bound introduced by this call
|
= help: the trait `Into<RgbaColor>` is implemented for `&str`
= help: for that trait implementation, expected `RgbaColor`, found `Code`
= note: required for `&str` to implement `Into<Code>`
note: required by a bound in `CodeSnap::code`
--> C:\Users\398334\.cargo\registry\src\index.crates.io-6f17d22bba15001f\codesnap-0.8.3\src\config.rs:281:17
|
281 | #[derive(Clone, Builder, Serialize, Deserialize, Debug)]
| ^^^^^^^ required by this bound in `CodeSnap::code`
...
290 | pub code: Code,
| ---- required by a bound in this associated function
= note: this error originates in the derive macro `Builder` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `rust-codesnap` (bin "rust-codesnap") due to 1 previous error
which I guess is kind of unfortunate because I don't see how I can fix it - thank you.
The text was updated successfully, but these errors were encountered:
You should use Code instead of &str, but the document for the CodeSnap library is indeed lack, I will complete it in future versions, thx for the issue report.
You're solving a huge problem in the industry that many are facing, great work!
However, for this short snippet:
I get this error:
which I guess is kind of unfortunate because I don't see how I can fix it - thank you.
The text was updated successfully, but these errors were encountered: