Skip to content

Commit

Permalink
Use a constant for set_icon: DEFAULT_APPLICATION_ICON_ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
zedseven committed Jul 20, 2023
1 parent 6513864 commit b636655
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ impl WindowsResource {
/// [here](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadicona)
/// for Windows docs demonstrating this.
pub fn set_icon<'a>(&mut self, path: &'a str) -> &mut Self {
self.set_icon_with_id(path, "32512")
const DEFAULT_APPLICATION_ICON_ID: &str = "32512";

self.set_icon_with_id(path, DEFAULT_APPLICATION_ICON_ID)
}

/// Add an icon with the specified name ID.
Expand Down

0 comments on commit b636655

Please sign in to comment.