zyxw59 / formationbot-rs

FormationBot renders square dance formations as pictures, to aid discussions of calling
MIT License
0 stars 1 forks source link

`cargo test` fails? #8

Closed dehnert closed 1 month ago

dehnert commented 1 month ago

When I run cargo test, I get errors:

$ cargo test
   Compiling discord-bot v0.1.0 ([...]/formationbot-rs/discord-bot)
error[E0277]: the trait bound `std::option::Option<std::string::String>: From<&str>` is not satisfied
   --> src/main.rs:175:27
    |
175 |             end_tag: "f/".into(),
    |                           ^^^^ the trait `From<&str>` is not implemented for `std::option::Option<std::string::String>`
    |
    = help: the following other types implement trait `From<T>`:
              <std::option::Option<tracing_core::metadata::Level> as From<tracing_core::metadata::LevelFilter>>
              <std::option::Option<tracing_core::span::Id> as From<tracing::span::Span>>
              <std::option::Option<tracing_core::span::Id> as From<tracing_core::span::Current>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing::span::Span>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing::span::EnteredSpan>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing_core::span::Id>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing_core::span::Current>>
              <std::option::Option<&'a tracing_core::span::Id> as From<&'a tracing::span::Span>>
            and 6 others
    = note: required for `&str` to implement `Into<std::option::Option<std::string::String>>`

error[E0277]: the trait bound `std::option::Option<std::string::String>: From<&str>` is not satisfied
   --> src/main.rs:176:32
    |
176 |             comment_tag: "://".into(),
    |                                ^^^^ the trait `From<&str>` is not implemented for `std::option::Option<std::string::String>`
    |
    = help: the following other types implement trait `From<T>`:
              <std::option::Option<tracing_core::metadata::Level> as From<tracing_core::metadata::LevelFilter>>
              <std::option::Option<tracing_core::span::Id> as From<tracing::span::Span>>
              <std::option::Option<tracing_core::span::Id> as From<tracing_core::span::Current>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing::span::Span>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing::span::EnteredSpan>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing_core::span::Id>>
              <std::option::Option<tracing_core::span::Id> as From<&'a tracing_core::span::Current>>
              <std::option::Option<&'a tracing_core::span::Id> as From<&'a tracing::span::Span>>
            and 6 others
    = note: required for `&str` to implement `Into<std::option::Option<std::string::String>>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `discord-bot` (bin "discord-bot" test) due to 2 previous errors

(I don't know Rust, so don't have a sense of whether this is like "Rust has changed in the last two years" or "I'm using the wrong version of Rust" or "dependencies changed" or "the tests never worked" or what.)

zyxw59 commented 1 month ago

Thanks for catching that. I must have not actually been running these tests, so they've probably been broken for a while.