Remove generic parameter T from EventLoopWindowTarget (#3298)

This commit is contained in:
Mads Marquart 2024-01-13 21:36:53 +01:00 committed by GitHub
parent 169cd39f93
commit 22311802b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 174 additions and 210 deletions

View file

@ -531,10 +531,7 @@ impl WindowBuilder {
/// - **Web:** The window is created but not inserted into the web page automatically. Please
/// see the web platform module for more information.
#[inline]
pub fn build<T: 'static>(
self,
window_target: &EventLoopWindowTarget<T>,
) -> Result<Window, OsError> {
pub fn build(self, window_target: &EventLoopWindowTarget) -> Result<Window, OsError> {
let window =
platform_impl::Window::new(&window_target.p, self.window, self.platform_specific)?;
window.maybe_queue_on_main(|w| w.request_redraw());
@ -558,7 +555,7 @@ impl Window {
///
/// [`WindowBuilder::new().build(event_loop)`]: WindowBuilder::build
#[inline]
pub fn new<T: 'static>(event_loop: &EventLoopWindowTarget<T>) -> Result<Window, OsError> {
pub fn new(event_loop: &EventLoopWindowTarget) -> Result<Window, OsError> {
let builder = WindowBuilder::new();
builder.build(event_loop)
}