MindFlavor/prometheus_wireguard_exporter

Build error

Closed this issue · 3 comments

Is this error something I'm doing wrong?

   Compiling prometheus_wireguard_exporter v3.6.4 (/usr/local/share/prometheus_wireguard_exporter)
error[E0277]: the trait bound `ServerOptions: From<(IpAddr, u16)>` is not satisfied
   --> src/main.rs:223:16
    |
223 |     let addr = (ip, bind).into();
    |                ^^^^^^^^^^ ---- required by a bound introduced by this call
    |                |
    |                the trait `From<(IpAddr, u16)>` is not implemented for `ServerOptions`
    |
    = note: required for `(IpAddr, u16)` to implement `Into<ServerOptions>`

error[E0277]: `ServerOptions` doesn't implement `std::fmt::Display`
   --> src/main.rs:225:53
    |
225 |     info!("starting exporter on http://{}/metrics", addr);
    |                                                     ^^^^ `ServerOptions` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `ServerOptions`
    = 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 `info` (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 `prometheus_wireguard_exporter` due to 2 previous errors
error: failed to compile `prometheus_wireguard_exporter v3.6.4 (/usr/local/share/prometheus_wireguard_exporter)`, intermediate artifacts can be found at `/usr/local/share/prometheus_wireguard_exporter/target`

No, it's not your fault! We just have different Cargo.toml files (and something in there did not follow semver properly 😥 ). I'll do another release shortly.

Well it turns out it's my fault: https://github.com/MindFlavor/prometheus_exporter_base... 🤦

Thanks. Got it running now.