-
Notifications
You must be signed in to change notification settings - Fork 95
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
Make ?
and %
formatters in kv!
more flexible
#170
Conversation
Would |
I had the same idea, but the issue is the same as with format_args (having a borrow in the kv map). |
The non-breaking alternative would be allocating a |
What's wrong with https://github.com/slog-rs/slog/tree/kv_fmt ? |
8d3d34b I mean |
I still don't understand what is this improving etc. so please add some tests that used to fail, and now are passing. :) |
I've added a test now. Btw, this is the massive and confusing error you'd get if you try to use
|
I see. Thanks! Will look into it in 10 hours, I hope. |
This allows using
?
and%
formatters when creating new loggers,e.g.
logger.new(o!("foo" => ?bar))
.Note that this is probably a breaking change
as
?
and%
don't borrow implicitly anymore.This change is