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

fix: fix changelog, warnings and lints #1155

Merged
merged 6 commits into from
Aug 25, 2024
Merged

Conversation

w-lfchen
Copy link
Contributor

@w-lfchen w-lfchen commented Aug 13, 2024

Description

While working on #1144 I noticed some new warnings when compiling. I'm assuming some warnings were stabilized or added.
This pr fixes these warnings, yielding a slight performance increase, for more details see below.
These are some breaking internal changes since APIs are modified and some call sites might now require generic annotations.

Replacing the field display_backend in the App struct with PhantomData

This field is never read, producing a warning when compiling with 1.80.0.
It seems to only exist for the type parameter B, which has not been restricted to DisplayBackend even though it probably should be.
By replacing it with a PhantomData, there is no need to pass the DisplayBackend around at all times since all the information this argument provides is already encoded in the generic type parameters.

Removal of field instance_id in the EwwWindow struct

This field is never read, producing a warning when compiling with 1.80.0.
All information it holds is already in the key of the open_windows map in the App struct. Removing it also makes the WindowInitiator's id field obsolete.

Checklist

  • I added my changes to CHANGELOG.md, if appropriate.
    I don't think this is necessary here
  • I used cargo fmt to automatically format all code before committing

@w-lfchen w-lfchen changed the title fix!: eliminate some dead code fix!: fix changelog, warnings and lints Aug 24, 2024
@w-lfchen w-lfchen changed the title fix!: fix changelog, warnings and lints fix: fix changelog, warnings and lints Aug 24, 2024
@elkowar
Copy link
Owner

elkowar commented Aug 25, 2024

image
damn, the way github displays this commit msg confused me for a good second, lmao

Thanks for your cleanup work!

@elkowar elkowar merged commit 3342234 into elkowar:master Aug 25, 2024
1 check passed
@w-lfchen w-lfchen deleted the fix/dead-code branch August 25, 2024 18:15
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