Skip to content

Commit

Permalink
lsp: Turn on experimental features when env var exists
Browse files Browse the repository at this point in the history
... without looking at the value in any way.

This is how everything else does it as well in Slint.
  • Loading branch information
hunger committed Aug 23, 2024
1 parent e488a36 commit 19b891f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tools/lsp/preview/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ pub(super) fn open_ui_impl(preview_state: &mut PreviewState) -> Result<(), slint
(style, !hide_ui, fullscreen)
};

// TODO: Handle Error!
let experimental = std::env::var_os("SLINT_ENABLE_EXPERIMENTAL_FEATURES")
.map(|s| !s.is_empty() && s != "0")
.unwrap_or(false);
let experimental = std::env::var_os("SLINT_ENABLE_EXPERIMENTAL_FEATURES").is_some();

let ui = match preview_state.ui.as_ref() {
Some(ui) => ui,
Expand Down

0 comments on commit 19b891f

Please sign in to comment.