Skip to content

Commit 95da90f

Browse files
authored
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
1 parent e847ced commit 95da90f

File tree

10 files changed

+38
-21
lines changed

10 files changed

+38
-21
lines changed

examples/api/src-tauri/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.8" }
2929
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.8" }
3030
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.9" }
3131

32-
[dependencies.tauri]
33-
workspace = true
34-
features = [
32+
[dependencies.tauri]
33+
workspace = true
34+
features = [
35+
"wry",
36+
"compression",
3537
"image-ico",
3638
"image-png",
3739
"isolation",

examples/api/src-tauri/gen/schemas/desktop-schema.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6754,6 +6754,13 @@
67546754
"window:allow-set-size"
67556755
]
67566756
},
6757+
{
6758+
"description": "window:allow-set-size-constraints -> Enables the set_size_constraints command without any pre-configured scope.",
6759+
"type": "string",
6760+
"enum": [
6761+
"window:allow-set-size-constraints"
6762+
]
6763+
},
67576764
{
67586765
"description": "window:allow-set-skip-taskbar -> Enables the set_skip_taskbar command without any pre-configured scope.",
67596766
"type": "string",
@@ -7202,6 +7209,13 @@
72027209
"window:deny-set-size"
72037210
]
72047211
},
7212+
{
7213+
"description": "window:deny-set-size-constraints -> Denies the set_size_constraints command without any pre-configured scope.",
7214+
"type": "string",
7215+
"enum": [
7216+
"window:deny-set-size-constraints"
7217+
]
7218+
},
72057219
{
72067220
"description": "window:deny-set-skip-taskbar -> Denies the set_skip_taskbar command without any pre-configured scope.",
72077221
"type": "string",

plugins/deep-link/examples/app/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tauri-build = { workspace = true }
1919
[dependencies]
2020
serde = { workspace = true }
2121
serde_json = { workspace = true }
22-
tauri = { workspace = true }
22+
tauri = { workspace = true, features = ["wry", "compression"] }
2323
tauri-plugin-deep-link = { path = "../../../" }
2424

2525
[features]

plugins/notification/src/desktop.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ mod imp {
156156
///
157157
/// - **Windows**: Not supported on Windows 7. If your app targets it, enable the `windows7-compat` feature and use [`Self::notify`].
158158
#[cfg_attr(
159-
all(not(doc_cfg), feature = "windows7-compat"),
159+
all(not(docsrs), feature = "windows7-compat"),
160160
deprecated = "This function does not work on Windows 7. Use `Self::notify` instead."
161161
)]
162162
pub fn show(self) -> crate::Result<()> {
@@ -220,7 +220,7 @@ mod imp {
220220
/// .expect("error while running tauri application");
221221
/// ```
222222
#[cfg(feature = "windows7-compat")]
223-
#[cfg_attr(doc_cfg, doc(cfg(feature = "windows7-compat")))]
223+
#[cfg_attr(docsrs, doc(cfg(feature = "windows7-compat")))]
224224
#[allow(unused_variables)]
225225
pub fn notify<R: tauri::Runtime>(self, app: &tauri::AppHandle<R>) -> crate::Result<()> {
226226
#[cfg(windows)]

plugins/notification/src/models.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ impl ActiveNotification {
352352
}
353353
}
354354

355+
#[cfg(mobile)]
355356
#[derive(Debug, Serialize)]
356357
#[serde(rename_all = "camelCase")]
357358
pub struct ActionType {
@@ -364,6 +365,7 @@ pub struct ActionType {
364365
hidden_previews_show_subtitle: bool,
365366
}
366367

368+
#[cfg(mobile)]
367369
#[derive(Debug, Serialize)]
368370
#[serde(rename_all = "camelCase")]
369371
pub struct Action {

plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ rust-version = "1.75"
1010
[dependencies]
1111
serde = { workspace = true }
1212
serde_json = { workspace = true }
13-
tauri = { workspace = true }
13+
tauri = { workspace = true, features = ["wry", "compression"] }
1414
tauri-plugin-single-instance = { path = "../../../" }
1515
tauri-plugin-cli = { path = "../../../../cli" }
1616

plugins/store/examples/AppSettingsManager/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ edition = "2021"
1313
tauri-build = { workspace = true }
1414

1515
[dependencies]
16-
tauri = { workspace = true }
16+
tauri = { workspace = true, features = ["wry", "compression"] }
1717
serde = { workspace = true }
1818
serde_json = { workspace = true }
1919
tauri-plugin-store = { path = "../../../" }

plugins/updater/src/config.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,17 @@ impl<'de> Deserialize<'de> for UpdaterEndpoint {
121121
D: Deserializer<'de>,
122122
{
123123
let url = Url::deserialize(deserializer)?;
124-
#[cfg(not(feature = "schema"))]
125-
{
126-
if url.scheme() != "https" {
127-
#[cfg(debug_assertions)]
128-
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.");
129-
130-
#[cfg(not(debug_assertions))]
131-
return Err(serde::de::Error::custom(
132-
"The configured updater endpoint must use the `https` protocol.",
133-
));
134-
}
124+
125+
if url.scheme() != "https" {
126+
#[cfg(debug_assertions)]
127+
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.");
128+
129+
#[cfg(not(debug_assertions))]
130+
return Err(serde::de::Error::custom(
131+
"The configured updater endpoint must use the `https` protocol.",
132+
));
135133
}
134+
136135
Ok(Self(url))
137136
}
138137
}

plugins/updater/tests/app-updater/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = { workspace = true }
77
tauri-build = { workspace = true }
88

99
[dependencies]
10-
tauri = { workspace = true }
10+
tauri = { workspace = true, features = ["wry", "compression"] }
1111
serde = { workspace = true }
1212
serde_json = { workspace = true }
1313
tauri-plugin-updater = { path = "../.." }

plugins/websocket/examples/tauri-app/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
[dependencies]
88
serde = { workspace = true }
99
serde_json = { workspace = true }
10-
tauri = { workspace = true }
10+
tauri = { workspace = true, features = ["wry", "compression"] }
1111
tokio = { version = "1", features = ["net"] }
1212
futures-util = "0.3"
1313
tauri-plugin-websocket = { path = "../../../" }

0 commit comments

Comments
 (0)