mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-18 16:57:19 +02:00
fix: clippy warnings, add missing wry feature on examples (#1604)
* fix: clippy warnings, add missing wry feature on examples * schema feat does not exist * also add compression
This commit is contained in:
committed by
GitHub
parent
e847cedc1f
commit
95da90f82e
@@ -121,18 +121,17 @@ impl<'de> Deserialize<'de> for UpdaterEndpoint {
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
let url = Url::deserialize(deserializer)?;
|
||||
#[cfg(not(feature = "schema"))]
|
||||
{
|
||||
if url.scheme() != "https" {
|
||||
#[cfg(debug_assertions)]
|
||||
eprintln!("[\x1b[33mWARNING\x1b[0m] The configured updater endpoint doesn't use `https` protocol. This is allowed in development but will fail in release builds.");
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
return Err(serde::de::Error::custom(
|
||||
"The configured updater endpoint must use the `https` protocol.",
|
||||
));
|
||||
}
|
||||
if url.scheme() != "https" {
|
||||
#[cfg(debug_assertions)]
|
||||
eprintln!("[\x1b[33mWARNING\x1b[0m] The configured updater endpoint doesn't use `https` protocol. This is allowed in development but will fail in release builds.");
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
return Err(serde::de::Error::custom(
|
||||
"The configured updater endpoint must use the `https` protocol.",
|
||||
));
|
||||
}
|
||||
|
||||
Ok(Self(url))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user