AlexanderThaller / prometheus_exporter

Helper libary to export prometheus metrics using tiny_http and rust-prometheus.
MIT License
28 stars 10 forks source link

Infinite recursion on StartError #4

Closed DomWilliams0 closed 4 years ago

DomWilliams0 commented 4 years ago

The Display implementation for StartError recurses infinitely, I assume it's supposed to reuse the Debug implementation instead?

impl fmt::Display for StartError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self)
    }
}

Thanks for the library by the way, a very easy drop-in :grin:

AlexanderThaller commented 4 years ago

It should be fixed now. I need to put some love into this project. Can you check if its fixed now? Using {:?} instead of {} should have fixed it :D.

Thank you for bringing this up.

AlexanderThaller commented 4 years ago

I published the fixed version as 0.6. Gonna close the issue. Thank you again!

DomWilliams0 commented 4 years ago

Confirmed it no longer loops forever in 0.6, cheers!