Skip to content

Remove unused QueryWithoutComment#1023

Merged
sgrif merged 1 commit into
mainfrom
sg-yeet-query-without-comment
May 29, 2026
Merged

Remove unused QueryWithoutComment#1023
sgrif merged 1 commit into
mainfrom
sg-yeet-query-without-comment

Conversation

@sgrif
Copy link
Copy Markdown
Contributor

@sgrif sgrif commented May 29, 2026

We reimplemented our own Cow for this, which isn't necessarily unreasonable but wasn't needed here for a few reasons. The first is that we don't actually have an Owned case. The code appears to be written assuming that you can't take a subslice of a string with the same lifetime as the original, which isn't true.

The only other reason we'd keep this is if we cared whether a query had a comment or not at some future point, but no code ever checks for this. We can reasonably determine this by checking if role and shard are both Some.

We reimplemented our own Cow for this, which isn't necessarily
unreasonable but wasn't needed here for a few reasons. The first is that
we don't actually have an Owned case. The code appears to be written
assuming that you can't take a subslice of a string with the same
lifetime as the original, which isn't true.

The only other reason we'd keep this is if we cared whether a query had
a comment or not at some future point, but no code ever checks for this.
We can reasonably determine this by checking if role and shard are both
Some.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@levkk levkk left a comment

Choose a reason for hiding this comment

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

neat

@sgrif sgrif merged commit 0b274fb into main May 29, 2026
42 of 43 checks passed
@sgrif sgrif deleted the sg-yeet-query-without-comment branch May 29, 2026 18:19
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.

2 participants