Skip to content
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 from<&String> to QAnyStringView #1127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nicolasfella
Copy link

Makes constructing a QAnyStringView from String slightly less verbose

Makes constructing a QAnyStringView from String slightly less verbose
@nicolasfella nicolasfella force-pushed the work/nico/convert-string branch from 751b169 to ed664b2 Compare November 17, 2024 22:41
@nicolasfella nicolasfella changed the title Add from(&String) to QAnyStringView Add from<&String> to QAnyStringView Nov 17, 2024
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (39b3264) to head (ed664b2).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1127   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           71        71           
  Lines        11927     11927           
=========================================
  Hits         11927     11927           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LeonMatthesKDAB
Copy link
Collaborator

@nicolasfella I'm all for making this convenient.
However, I'm wondering why the From<&str> implementation isn't sufficient...
String should deref to &str, so in theory QAnyStringView::from(&my_string) should do the trick.
And I assume the same works for my_string.into().

Can you share the exact code that this get's rid off.

@redstrate
Copy link
Contributor

@nicolasfella ping?

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