MindFlavor / prometheus_wireguard_exporter

A Prometheus exporter for WireGuard, written in Rust.
https://mindflavor.github.io/prometheus_wireguard_exporter
MIT License
463 stars 49 forks source link

Build error #102

Closed kramrm closed 1 year ago

kramrm commented 1 year ago

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`
MindFlavor commented 1 year ago

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.

MindFlavor commented 1 year ago

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

kramrm commented 1 year ago

Thanks. Got it running now.