Skip to content

Example code won't build with log = "0.4.14" #787

@ghost

Description

just tried to run the "get started" example and it failed to build, with error like

error[E0277]: the trait bound `std::string::String: ToValue` is not satisfied
   --> /home/cli/.cargo/registry/src/github.202132.xyz-1ecc6299db9ec823/tide-0.15.0/src/listener/failover_listener.rs:112:21
    |
112 | /                     crate::log::info!("unable to bind", {
113 | |                         listener: listener.to_string(),
114 | |                         error: e.to_string()
115 | |                     });
    | |_______________________^ the trait `ToValue` is not implemented for `std::string::String`
    |
    = note: required for the cast to the object type `dyn ToValue`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

Look like the latest log 0.4.14 which was installed by default causes the problem, have to explicitly specify using the previous version so that it can build

# this works
log = "=0.4.13"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions