Skip to content

Queston about one event struct #1627

@InnocentusLime

Description

@InnocentusLime

I've been looking through docs for WindowEvent and found the following definiton:

ScaleFactorChanged {
    scale_factor: f64,
    new_inner_size: &'a mut PhysicalSize<u32>,
},

I have several questions

  1. Why is new_inner_size a mutable reference? That seems really weird
  2. Why is it a reference at all? Why not just make it a value?

If there are no reasons, I'd like to make a PR to fix that... After all it will potentially make WindowEvent 'static + Clone + Copy. Not only that. It seems like the whole Event struct will become Clone + 'static. Maybe even Copy!

Metadata

Metadata

Assignees

No one assigned

    Labels

    F - duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions