mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 05:21:31 +11:00
Make WindowBuilder
's with_app_id
method more ergonomic
This commit is contained in:
parent
001fb7ef60
commit
7cd273ae58
|
@ -379,7 +379,7 @@ pub trait WindowBuilderExtUnix {
|
||||||
/// For details about application ID conventions, see the
|
/// For details about application ID conventions, see the
|
||||||
/// [Desktop Entry Spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-file-id)
|
/// [Desktop Entry Spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#desktop-file-id)
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
fn with_app_id(self, app_id: String) -> Self;
|
fn with_app_id<T: Into<String>>(self, app_id: T) -> Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WindowBuilderExtUnix for WindowBuilder {
|
impl WindowBuilderExtUnix for WindowBuilder {
|
||||||
|
@ -444,8 +444,8 @@ impl WindowBuilderExtUnix for WindowBuilder {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(feature = "wayland")]
|
#[cfg(feature = "wayland")]
|
||||||
fn with_app_id(mut self, app_id: String) -> Self {
|
fn with_app_id<T: Into<String>>(mut self, app_id: T) -> Self {
|
||||||
self.platform_specific.app_id = Some(app_id);
|
self.platform_specific.app_id = Some(app_id.into());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue