Skip to content

Conversation

@KodrAus
Copy link
Contributor

@KodrAus KodrAus commented Oct 19, 2025

For #706

($logger:expr) => {{
&($logger)
}};
($logger:expr) => {&($logger)};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block shouldn't matter right? (fine with the code change though)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd think not, but this is one of the edition-based lifetime changes. In the 2024 edition, this borrow is for a lifetime that doesn't outlive the block.

// Types for the `kv` argument.

impl<'a> KVs<'a> for &'a [(&'a str, Value<'a>)] {
impl<'a, const N: usize> KVs<'a> for &'a [(&'a str, Value<'a>); N] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with the change. I do wonder if this changes the binary size as now create code per N/size, but I don't know if this will impact anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't actually trigger the same build failure reported in #706 yet, so this one is purely speculative right now.

The change in code size is a good point, I'll measure it and see what impact it has. I wouldn't be surprised if it made no difference, but is definitely worth checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants