From 7cd273ae584b83517ea0b55749b4b4443394abc9 Mon Sep 17 00:00:00 2001 From: Benjamin Brittain Date: Fri, 21 Jan 2022 19:42:46 -0500 Subject: [PATCH] Make `WindowBuilder`'s `with_app_id` method more ergonomic --- src/platform/unix.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/unix.rs b/src/platform/unix.rs index ba600b134b..74dc769b67 100644 --- a/src/platform/unix.rs +++ b/src/platform/unix.rs @@ -379,7 +379,7 @@ pub trait WindowBuilderExtUnix { /// 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) #[cfg(feature = "wayland")] - fn with_app_id(self, app_id: String) -> Self; + fn with_app_id>(self, app_id: T) -> Self; } impl WindowBuilderExtUnix for WindowBuilder { @@ -444,8 +444,8 @@ impl WindowBuilderExtUnix for WindowBuilder { #[inline] #[cfg(feature = "wayland")] - fn with_app_id(mut self, app_id: String) -> Self { - self.platform_specific.app_id = Some(app_id); + fn with_app_id>(mut self, app_id: T) -> Self { + self.platform_specific.app_id = Some(app_id.into()); self } }