fralalonde / dipstick

Configurable metrics toolkit for Rust applications
Apache License 2.0
99 stars 9 forks source link

Can't compile without default features #79

Closed vorner closed 4 years ago

vorner commented 4 years ago

Hello

If I turn off the default features, dipstick (master and 0.7.12) fails to compile:

error[E0308]: mismatched types
   --> src/output/graphite.rs:106:26
    |
106 |         self.flush_inner(buf)
    |                          ^^^ expected struct `std::sync::RwLockWriteGuard`, found enum `std::result::Result`
    |
    = note: expected struct `std::sync::RwLockWriteGuard<'_, _>`
                 found enum `std::result::Result<std::sync::RwLockWriteGuard<'_, _>, std::sync::PoisonError<std::sync::RwLockWriteGuard<'_, std::string::String>>>`

I suspect it's about using std or parking-lot mutexes, but I haven't dug into it yet.

fralalonde commented 4 years ago

Oops. I fixed it and released it under v0.7.13. Also doctests now run using --no-default-features to prevent this from happening again (release build will break).

fralalonde commented 4 years ago

I'll let you close this issue after confirming this works for you.

vorner commented 4 years ago

Oh, sorry, I've let it run in travis in the background and forgot to come back to it. Yes, it works, thanks!