Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issues when test feature enabled #46

Closed
jgoerzen opened this issue Sep 11, 2019 · 1 comment

Comments

@jgoerzen
Copy link

commented Sep 11, 2019

error[E0308]: mismatched types
   --> /home/jgoerzen/.cargo/registry/src/github.com-1ecc6299db9ec823/simplelog-0.7.1/src/loggers/testlog.rs:106:12
    |
106 |     if let Some(time) = config.time {
    |            ^^^^^^^^^^   ----------- this match expression has type `log::LevelFilter`
    |            |
    |            expected enum `log::LevelFilter`, found enum `std::option::Option`
    |
    = note: expected type `log::LevelFilter`
               found type `std::option::Option<_>`

error[E0308]: mismatched types
   --> /home/jgoerzen/.cargo/registry/src/github.com-1ecc6299db9ec823/simplelog-0.7.1/src/loggers/testlog.rs:112:12
    |
112 |     if let Some(level) = config.level {
    |            ^^^^^^^^^^^   ------------ this match expression has type `log::LevelFilter`
    |            |
    |            expected enum `log::LevelFilter`, found enum `std::option::Option`
    |
    = note: expected type `log::LevelFilter`
               found type `std::option::Option<_>`

error[E0308]: mismatched types
   --> /home/jgoerzen/.cargo/registry/src/github.com-1ecc6299db9ec823/simplelog-0.7.1/src/loggers/testlog.rs:118:12
    |
118 |     if let Some(thread) = config.thread {
    |            ^^^^^^^^^^^^   ------------- this match expression has type `log::LevelFilter`
    |            |
    |            expected enum `log::LevelFilter`, found enum `std::option::Option`
    |
    = note: expected type `log::LevelFilter`
               found type `std::option::Option<_>`

error[E0308]: mismatched types
   --> /home/jgoerzen/.cargo/registry/src/github.com-1ecc6299db9ec823/simplelog-0.7.1/src/loggers/testlog.rs:124:12
    |
124 |     if let Some(target) = config.target {
    |            ^^^^^^^^^^^^   ------------- this match expression has type `log::LevelFilter`
    |            |
    |            expected enum `log::LevelFilter`, found enum `std::option::Option`
    |
    = note: expected type `log::LevelFilter`
               found type `std::option::Option<_>`

error[E0308]: mismatched types
   --> /home/jgoerzen/.cargo/registry/src/github.com-1ecc6299db9ec823/simplelog-0.7.1/src/loggers/testlog.rs:130:12
    |
130 |     if let Some(location) = config.location {
    |            ^^^^^^^^^^^^^^   --------------- this match expression has type `log::LevelFilter`
    |            |
    |            expected enum `log::LevelFilter`, found enum `std::option::Option`
    |
    = note: expected type `log::LevelFilter`
               found type `std::option::Option<_>`

error[E0599]: no method named `unwrap_or` found for type `std::borrow::Cow<'static, str>` in the current scope
   --> /home/jgoerzen/.cargo/registry/src/github.com-1ecc6299db9ec823/simplelog-0.7.1/src/loggers/testlog.rs:144:44
    |
144 |         cur_time.format(config.time_format.unwrap_or("%H:%M:%S"))
    |                                            ^^^^^^^^^

error: aborting due to 6 previous errors

Builds fine without test feature... but I need that feature

@Drakulix Drakulix closed this in 3ba834e Sep 16, 2019

Drakulix added a commit that referenced this issue Sep 16, 2019
@Drakulix

This comment has been minimized.

Copy link
Owner

commented Sep 16, 2019

Fix released with 0.7.3 on crates.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.