Skip to content

Event now takes a lifetime #1387

@est31

Description

@est31

Since the 0.20.0 release, Event as well as WindowEvent are now taking lifetimes (old docs.rs, new docs.rs). The reason for this is the ScaleFactorChanged event's new_inner_size field. I think this change is bad: First, separation of concerns is violated. Events are supposed to be immutable input to the program, not provide means for the program to react to that input. Second, Event now ceased to be Clone and the lifetime means I have to think about workarounds in glium's example support code: glium/glium#1817.

The PR that has added the lifteime seems to be #895 where it was still called new_inner_rect_opt.

Can this feedback maybe be implemented in a different way?

I have great respect for you folks. Thanks for maintaining glutin/winit.

PRs to watch:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions