-
Notifications
You must be signed in to change notification settings - Fork 253
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
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @piegamesde!
Closes #458. Turns out that
Rc<Log>
isn't possible becauseLog: Sync
. Other candidates for adding:Cow
Option
()
(this would allow us to get rid of the internalNopLogger
)Pin
(?)