Skip to content

Commit

Permalink
Win: remove unused code warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Getreu committed May 5, 2023
1 parent 175accf commit b80e22f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tpnote-lib/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const ENV_VAR_USERNAME: &str = "USERNAME";
const ENV_VAR_USER: &str = "USER";

/// Name of the `LANG` environment variable.
#[cfg(not(target_family = "windows"))]
const ENV_VAR_LANG: &str = "LANG";

#[cfg(feature = "lang-detection")]
Expand Down Expand Up @@ -177,7 +178,6 @@ fn update_lang_setting(settings: &mut Settings) {
if let Some(tpnotelang) = tpnotelang {
lang = tpnotelang;
} else {
lang = String::new();
let mut buf = [0u16; LOCALE_NAME_MAX_LENGTH as usize];
let len = unsafe { GetUserDefaultLocaleName(buf.as_mut_ptr(), buf.len() as i32) };
if len > 0 {
Expand Down

0 comments on commit b80e22f

Please sign in to comment.