@@ -646,12 +646,7 @@ impl Settings {
646646
647647 /// Returns the bundle's identifier
648648 pub fn bundle_identifier ( & self ) -> & str {
649- self
650- . bundle_settings
651- . identifier
652- . as_ref ( )
653- . map ( String :: as_str)
654- . unwrap_or ( "" )
649+ self . bundle_settings . identifier . as_deref ( ) . unwrap_or ( "" )
655650 }
656651
657652 /// Returns an iterator over the icon files to be used for this bundle.
@@ -720,7 +715,7 @@ impl Settings {
720715
721716 /// Returns the copyright text.
722717 pub fn copyright_string ( & self ) -> Option < & str > {
723- self . bundle_settings . copyright . as_ref ( ) . map ( String :: as_str )
718+ self . bundle_settings . copyright . as_deref ( )
724719 }
725720
726721 /// Returns the list of authors name.
@@ -743,12 +738,7 @@ impl Settings {
743738
744739 /// Returns the package's homepage URL, defaulting to "" if not defined.
745740 pub fn homepage_url ( & self ) -> & str {
746- & self
747- . package
748- . homepage
749- . as_ref ( )
750- . map ( String :: as_str)
751- . unwrap_or ( "" )
741+ & self . package . homepage . as_deref ( ) . unwrap_or ( "" )
752742 }
753743
754744 /// Returns the app's category.
@@ -767,11 +757,7 @@ impl Settings {
767757
768758 /// Returns the app's long description.
769759 pub fn long_description ( & self ) -> Option < & str > {
770- self
771- . bundle_settings
772- . long_description
773- . as_ref ( )
774- . map ( String :: as_str)
760+ self . bundle_settings . long_description . as_deref ( )
775761 }
776762
777763 /// Returns the dependencies of the debian bundle.
@@ -797,20 +783,12 @@ impl Settings {
797783
798784 /// Returns the minimum system version of the macOS bundle.
799785 pub fn osx_minimum_system_version ( & self ) -> Option < & str > {
800- self
801- . bundle_settings
802- . osx_minimum_system_version
803- . as_ref ( )
804- . map ( String :: as_str)
786+ self . bundle_settings . osx_minimum_system_version . as_deref ( )
805787 }
806788
807789 /// Returns the path to the DMG bundle license.
808790 pub fn osx_license ( & self ) -> Option < & str > {
809- self
810- . bundle_settings
811- . osx_license
812- . as_ref ( )
813- . map ( String :: as_str)
791+ self . bundle_settings . osx_license . as_deref ( )
814792 }
815793
816794 /// Returns whether the macOS .app bundle should use the bootstrap script or not.
0 commit comments