Skip to content

Conversation

@arihant2math
Copy link
Contributor

Fix warnings from components/fonts/platform/windows/font.rs and components/fonts/platform/windows/font_list.rs due to deprecations from dwrote.

Testing: none, should behave as it did before

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
Copy link
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

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

Thanks! Just a few comments:

@arihant2math arihant2math requested a review from mrobinson May 21, 2025 06:50
@mrobinson mrobinson changed the title chore: fix warnings for windows-specific fonts code chore: fix warnings for Windows-specific fonts code May 21, 2025
@mrobinson mrobinson enabled auto-merge May 21, 2025 07:06
@mrobinson mrobinson added this pull request to the merge queue May 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 21, 2025
@mrobinson
Copy link
Member

My suggestion was missing a let:

error[E0425]: cannot find value `family_name` in this scope
  --> components\fonts\platform\windows\font_list.rs:28:15
   |
28 |         if Ok(family_name) = family.family_name() {
   |               ^^^^^^^^^^^ not found in this scope
   |
help: you might have meant to use pattern matching
   |
28 |         if let Ok(family_name) = family.family_name() {
   |            +++

error[E0425]: cannot find value `family_name` in this scope
  --> components\fonts\platform\windows\font_list.rs:29:22
   |
29 |             callback(family_name);
   |                      ^^^^^^^^^^^ not found in this scope

error[E0308]: mismatched types
  --> components\fonts\platform\windows\font_list.rs:28:12
   |
28 |         if Ok(family_name) = family.family_name() {
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
   |
help: consider adding `let`
   |
28 |         if let Ok(family_name) = family.family_name() {
   |            +++

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
@arihant2math
Copy link
Contributor Author

Fixed!

@mrobinson mrobinson enabled auto-merge May 21, 2025 15:59
@mrobinson mrobinson added this pull request to the merge queue May 21, 2025
Merged via the queue into servo:main with commit cebb161 May 21, 2025
21 checks passed
@arihant2math arihant2math deleted the font-warning-fix branch May 21, 2025 18:31
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