mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-04 20:16:34 +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:
@@ -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-process = { path = "../../../plugins/process", version = "2.0.0-beta.8" }
|
||||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.9" }
|
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.9" }
|
||||||
|
|
||||||
[dependencies.tauri]
|
[dependencies.tauri]
|
||||||
workspace = true
|
workspace = true
|
||||||
features = [
|
features = [
|
||||||
|
"wry",
|
||||||
|
"compression",
|
||||||
"image-ico",
|
"image-ico",
|
||||||
"image-png",
|
"image-png",
|
||||||
"isolation",
|
"isolation",
|
||||||
|
|||||||
@@ -6754,6 +6754,13 @@
|
|||||||
"window:allow-set-size"
|
"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.",
|
"description": "window:allow-set-skip-taskbar -> Enables the set_skip_taskbar command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -7202,6 +7209,13 @@
|
|||||||
"window:deny-set-size"
|
"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.",
|
"description": "window:deny-set-skip-taskbar -> Denies the set_skip_taskbar command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ tauri-build = { workspace = true }
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true, features = ["wry", "compression"] }
|
||||||
tauri-plugin-deep-link = { path = "../../../" }
|
tauri-plugin-deep-link = { path = "../../../" }
|
||||||
|
|
||||||
[features]
|
[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`].
|
/// - **Windows**: Not supported on Windows 7. If your app targets it, enable the `windows7-compat` feature and use [`Self::notify`].
|
||||||
#[cfg_attr(
|
#[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."
|
deprecated = "This function does not work on Windows 7. Use `Self::notify` instead."
|
||||||
)]
|
)]
|
||||||
pub fn show(self) -> crate::Result<()> {
|
pub fn show(self) -> crate::Result<()> {
|
||||||
@@ -220,7 +220,7 @@ mod imp {
|
|||||||
/// .expect("error while running tauri application");
|
/// .expect("error while running tauri application");
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg(feature = "windows7-compat")]
|
#[cfg(feature = "windows7-compat")]
|
||||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "windows7-compat")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "windows7-compat")))]
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
pub fn notify<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> {
|
pub fn notify<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ impl ActiveNotification {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(mobile)]
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ActionType {
|
pub struct ActionType {
|
||||||
@@ -364,6 +365,7 @@ pub struct ActionType {
|
|||||||
hidden_previews_show_subtitle: bool,
|
hidden_previews_show_subtitle: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(mobile)]
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Action {
|
pub struct Action {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ rust-version = "1.75"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true, features = ["wry", "compression"] }
|
||||||
tauri-plugin-single-instance = { path = "../../../" }
|
tauri-plugin-single-instance = { path = "../../../" }
|
||||||
tauri-plugin-cli = { path = "../../../../cli" }
|
tauri-plugin-cli = { path = "../../../../cli" }
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ edition = "2021"
|
|||||||
tauri-build = { workspace = true }
|
tauri-build = { workspace = true }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true, features = ["wry", "compression"] }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tauri-plugin-store = { path = "../../../" }
|
tauri-plugin-store = { path = "../../../" }
|
||||||
|
|||||||
@@ -121,18 +121,17 @@ impl<'de> Deserialize<'de> for UpdaterEndpoint {
|
|||||||
D: Deserializer<'de>,
|
D: Deserializer<'de>,
|
||||||
{
|
{
|
||||||
let url = Url::deserialize(deserializer)?;
|
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))]
|
if url.scheme() != "https" {
|
||||||
return Err(serde::de::Error::custom(
|
#[cfg(debug_assertions)]
|
||||||
"The configured updater endpoint must use the `https` protocol.",
|
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))
|
Ok(Self(url))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = { workspace = true }
|
|||||||
tauri-build = { workspace = true }
|
tauri-build = { workspace = true }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true, features = ["wry", "compression"] }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tauri-plugin-updater = { path = "../.." }
|
tauri-plugin-updater = { path = "../.." }
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true, features = ["wry", "compression"] }
|
||||||
tokio = { version = "1", features = ["net"] }
|
tokio = { version = "1", features = ["net"] }
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
tauri-plugin-websocket = { path = "../../../" }
|
tauri-plugin-websocket = { path = "../../../" }
|
||||||
|
|||||||
Reference in New Issue
Block a user