Closed urkle closed 11 months ago
Merging #272 (245a6ca) into main (ce87f7d) will increase coverage by
0.3%
. The diff coverage is100.0%
.
Files | Coverage Δ | |
---|---|---|
src/types/quota.rs | 92.5% <100.0%> (+4.9%) |
:arrow_up: |
Hmm, this doesn't seem quite right — it means there's no way to avoid turning it into an owned string. Wouldn't it be better to impl From<String> for QuotaResourceName<'static>
in addition instead?
Hmm, this doesn't seem quite right — it means there's no way to avoid turning it into an owned string. Wouldn't it be better to
impl From<String> for QuotaResourceName<'static>
in addition instead?
Yup.. that makes better sense. I knew this was "fishy", just wasn't sure how to easily fix it.
@jonhoo updated
In using the quota feature in my application (finally) I noticed that I was running into life-time specifier issues trying to convert my input String into a QuotaResourceLimit through the Into argument.
I had to resort to re-implementing my own match line to convert into an Owned QuotaResourceName.
This PR adds an implementation of From for QuotaResourceName<'_> so strings can be utilized as well as &str.
This change is