diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-10-25 13:12:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-25 13:12:24 +0200 |
| commit | 499fd64df83f1aa1563c3c7f99b4e19a6b833b4b (patch) | |
| tree | 2f9e74cf3e92e5e26df74709b8acbcae296c9a14 /zellij-utils/src | |
| parent | docs(changelog): new themes (diff) | |
| download | sl0ppij-499fd64df83f1aa1563c3c7f99b4e19a6b833b4b.tar.gz sl0ppij-499fd64df83f1aa1563c3c7f99b4e19a6b833b4b.tar.xz sl0ppij-499fd64df83f1aa1563c3c7f99b4e19a6b833b4b.zip | |
style(fmt): remove warnings (#3701)
Diffstat (limited to 'zellij-utils/src')
| -rw-r--r-- | zellij-utils/src/input/layout.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs index 9b97c278..7c91f12b 100644 --- a/zellij-utils/src/input/layout.rs +++ b/zellij-utils/src/input/layout.rs @@ -1229,8 +1229,8 @@ impl Layout { ), } } + #[cfg(not(target_family = "wasm"))] pub fn stringified_from_url(url: &str) -> Result<String, ConfigError> { - #[cfg(not(target_family = "wasm"))] let raw_layout = task::block_on(async move { let download = Downloader::download_without_cache(url).await; match download { @@ -1238,8 +1238,11 @@ impl Layout { Err(e) => Err(ConfigError::DownloadError(format!("{}", e))), } })?; + Ok(raw_layout) + } + #[cfg(target_family = "wasm")] + pub fn stringified_from_url(_url: &str) -> Result<String, ConfigError> { // silently fail - this should not happen in plugins and legacy architecture is hard - #[cfg(target_family = "wasm")] let raw_layout = String::new(); Ok(raw_layout) } @@ -1284,7 +1287,7 @@ impl Layout { Ok((layout, config)) } #[cfg(target_family = "wasm")] - pub fn from_url(url: &str, config: Config) -> Result<(Layout, Config), ConfigError> { + pub fn from_url(_url: &str, _config: Config) -> Result<(Layout, Config), ConfigError> { Err(ConfigError::DownloadError(format!( "Unsupported platform, cannot download layout from the web" ))) |
