fix(deep-link): allow empty config values (#1732)

This commit is contained in:
Lucas Fernandes Nogueira
2024-09-04 08:18:42 -03:00
committed by GitHub
parent feb1e93fcb
commit 4654591d82
2 changed files with 13 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"deep-link": patch
---
Allow empty configuration values.
+8
View File
@@ -32,10 +32,12 @@ where
#[derive(Deserialize)]
pub struct Config {
/// Mobile requires `https://<host>` urls.
#[serde(default)]
pub mobile: Vec<AssociatedDomain>,
/// Desktop requires urls starting with `<scheme>://`.
/// These urls are also active in dev mode on Android.
#[allow(unused)] // Used in tauri-bundler
#[serde(default)]
pub desktop: DesktopProtocol,
}
@@ -46,3 +48,9 @@ pub enum DesktopProtocol {
One(DeepLinkProtocol),
List(Vec<DeepLinkProtocol>),
}
impl Default for DesktopProtocol {
fn default() -> Self {
Self::List(Vec::new())
}
}