Add Log implementation for &impl Log and Arc<impl Log>#471
Conversation
|
Thanks @piegamesde! I think this is a great starting point. I think ideally we'd stick to implementations that can unconditionally forward to another implementation, like |
|
I'd argue that the intent for This still leaves |
|
Yeh, there are subtleties in the semantics that I don't think the benefit outweighs for |
Let's do all that make sense right now. I added For the potential recursion issue mentioned in review, I added |
|
Ah it looks like we might need to back |
|
Yes, I've seen the CI fail too. Is there a way to feature guard this only for newer Rust versions? Edit: found it: https://github.com/dtolnay/rustversion#use-cases |
|
Ah unfortunately we can’t really introduce any unconditional dependencies such as |
Closes rust-lang#458. Implements Log for references to loggers, as well as loggers wrapped in `Arc` or `Pin`. More may be added in the future. Especially, we probably will want to add a blanket implementation (bounded on `Borrow`) once we have impl specialization. (Technically, we could probably already do this now, but at the risk of painting ourselves into a corner.)
Removes the Pin implementation again, because of the MSRV of the crate beeing too low
|
I removed the |
KodrAus
left a comment
There was a problem hiding this comment.
Thanks for working on this @piegamesde!
Closes #458. Turns out that
Rc<Log>isn't possible becauseLog: Sync. Other candidates for adding:CowOption()(this would allow us to get rid of the internalNopLogger)Pin(?)