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
pull/1606/head
Lucas Fernandes Nogueira 10 months ago committed by GitHub
parent e847cedc1f
commit 95da90f82e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -29,9 +29,11 @@ tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.8" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.8" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.9" }
[dependencies.tauri]
workspace = true
features = [
[dependencies.tauri]
workspace = true
features = [
"wry",
"compression",
"image-ico",
"image-png",
"isolation",

@ -6754,6 +6754,13 @@
"window:allow-set-size"
]
},
{
"description": "window:allow-set-size-constraints -> Enables the set_size_constraints command without any pre-configured scope.",
"type": "string",
"enum": [
"window:allow-set-size-constraints"
]
},
{
"description": "window:allow-set-skip-taskbar -> Enables the set_skip_taskbar command without any pre-configured scope.",
"type": "string",
@ -7202,6 +7209,13 @@
"window:deny-set-size"
]
},
{
"description": "window:deny-set-size-constraints -> Denies the set_size_constraints command without any pre-configured scope.",
"type": "string",
"enum": [
"window:deny-set-size-constraints"
]
},
{
"description": "window:deny-set-skip-taskbar -> Denies the set_skip_taskbar command without any pre-configured scope.",
"type": "string",

@ -19,7 +19,7 @@ tauri-build = { workspace = true }
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true }
tauri = { workspace = true, features = ["wry", "compression"] }
tauri-plugin-deep-link = { path = "../../../" }
[features]

@ -156,7 +156,7 @@ mod imp {
///
/// - **Windows**: Not supported on Windows 7. If your app targets it, enable the `windows7-compat` feature and use [`Self::notify`].
#[cfg_attr(
all(not(doc_cfg), feature = "windows7-compat"),
all(not(docsrs), feature = "windows7-compat"),
deprecated = "This function does not work on Windows 7. Use `Self::notify` instead."
)]
pub fn show(self) -> crate::Result<()> {
@ -220,7 +220,7 @@ mod imp {
/// .expect("error while running tauri application");
/// ```
#[cfg(feature = "windows7-compat")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "windows7-compat")))]
#[cfg_attr(docsrs, doc(cfg(feature = "windows7-compat")))]
#[allow(unused_variables)]
pub fn notify<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> {
#[cfg(windows)]

@ -352,6 +352,7 @@ impl ActiveNotification {
}
}
#[cfg(mobile)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ActionType {
@ -364,6 +365,7 @@ pub struct ActionType {
hidden_previews_show_subtitle: bool,
}
#[cfg(mobile)]
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct Action {

@ -10,7 +10,7 @@ rust-version = "1.75"
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true }
tauri = { workspace = true, features = ["wry", "compression"] }
tauri-plugin-single-instance = { path = "../../../" }
tauri-plugin-cli = { path = "../../../../cli" }

@ -13,7 +13,7 @@ edition = "2021"
tauri-build = { workspace = true }
[dependencies]
tauri = { workspace = true }
tauri = { workspace = true, features = ["wry", "compression"] }
serde = { workspace = true }
serde_json = { workspace = true }
tauri-plugin-store = { path = "../../../" }

@ -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))
}
}

@ -7,7 +7,7 @@ edition = { workspace = true }
tauri-build = { workspace = true }
[dependencies]
tauri = { workspace = true }
tauri = { workspace = true, features = ["wry", "compression"] }
serde = { workspace = true }
serde_json = { workspace = true }
tauri-plugin-updater = { path = "../.." }

@ -7,7 +7,7 @@ edition = "2021"
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
tauri = { workspace = true }
tauri = { workspace = true, features = ["wry", "compression"] }
tokio = { version = "1", features = ["net"] }
futures-util = "0.3"
tauri-plugin-websocket = { path = "../../../" }

Loading…
Cancel
Save