Skip to content

Commit 882b0ad

Browse files
authored
chore: apply clippy suggestions. (#11849)
* chore: apply clippy suggestions. * . * .
1 parent 89e30ef commit 882b0ad

File tree

13 files changed

+17
-17
lines changed

13 files changed

+17
-17
lines changed

crates/tauri-bundler/src/bundle/category.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ struct AppCategoryVisitor {
249249
did_you_mean: Option<&'static str>,
250250
}
251251

252-
impl<'d> serde::de::Visitor<'d> for AppCategoryVisitor {
252+
impl serde::de::Visitor<'_> for AppCategoryVisitor {
253253
type Value = AppCategory;
254254

255255
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

crates/tauri-bundler/src/bundle/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ pub struct WixSettings {
408408
pub banner_path: Option<PathBuf>,
409409
/// Path to a bitmap file to use on the installation user interface dialogs.
410410
/// It is used on the welcome and completion dialogs.
411-
411+
///
412412
/// The required dimensions are 493px × 312px.
413413
pub dialog_image_path: Option<PathBuf>,
414414
/// Enables FIPS compliant algorithms.

crates/tauri-cli/config.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@
25352535
]
25362536
},
25372537
"dialogImagePath": {
2538-
"description": "Path to a bitmap file to use on the installation user interface dialogs.\n It is used on the welcome and completion dialogs.\n The required dimensions are 493px × 312px.",
2538+
"description": "Path to a bitmap file to use on the installation user interface dialogs.\n It is used on the welcome and completion dialogs.\n\n The required dimensions are 493px × 312px.",
25392539
"type": [
25402540
"string",
25412541
"null"

crates/tauri-cli/src/interface/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ mod pkgconfig_utils {
15331533
if !output.stdout.is_empty() {
15341534
// output would be "-L/path/to/library\n"
15351535
let word = output.stdout[2..].to_vec();
1536-
return Some(String::from_utf8_lossy(&word).trim().to_string());
1536+
Some(String::from_utf8_lossy(&word).trim().to_string())
15371537
} else {
15381538
None
15391539
}

crates/tauri-cli/src/interface/rust/desktop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ mod terminal {
440440
// INVALID_HANDLE_VALUE. Use an alternate method which works
441441
// in that case as well.
442442
let h = CreateFileA(
443-
"CONOUT$\0".as_ptr() as PCSTR,
443+
c"CONOUT$".as_ptr() as PCSTR,
444444
GENERIC_READ | GENERIC_WRITE,
445445
FILE_SHARE_READ | FILE_SHARE_WRITE,
446446
ptr::null_mut(),

crates/tauri-schema-generator/schemas/config.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@
25352535
]
25362536
},
25372537
"dialogImagePath": {
2538-
"description": "Path to a bitmap file to use on the installation user interface dialogs.\n It is used on the welcome and completion dialogs.\n The required dimensions are 493px × 312px.",
2538+
"description": "Path to a bitmap file to use on the installation user interface dialogs.\n It is used on the welcome and completion dialogs.\n\n The required dimensions are 493px × 312px.",
25392539
"type": [
25402540
"string",
25412541
"null"

crates/tauri-utils/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ pub struct WixConfig {
750750
pub banner_path: Option<PathBuf>,
751751
/// Path to a bitmap file to use on the installation user interface dialogs.
752752
/// It is used on the welcome and completion dialogs.
753-
753+
///
754754
/// The required dimensions are 493px × 312px.
755755
#[serde(alias = "dialog-image-path")]
756756
pub dialog_image_path: Option<PathBuf>,
@@ -2644,7 +2644,7 @@ impl<'d> serde::Deserialize<'d> for PackageVersion {
26442644
fn deserialize<D: Deserializer<'d>>(deserializer: D) -> Result<Self, D::Error> {
26452645
struct PackageVersionVisitor;
26462646

2647-
impl<'d> Visitor<'d> for PackageVersionVisitor {
2647+
impl Visitor<'_> for PackageVersionVisitor {
26482648
type Value = PackageVersion;
26492649

26502650
fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {

crates/tauri-utils/src/resources.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub struct ResourcePathsIter<'a> {
142142
glob_iter: Option<glob::Paths>,
143143
}
144144

145-
impl<'a> ResourcePathsIter<'a> {
145+
impl ResourcePathsIter<'_> {
146146
fn next_glob_iter(&mut self) -> Option<crate::Result<Resource>> {
147147
let entry = self.glob_iter.as_mut().unwrap().next()?;
148148

@@ -270,15 +270,15 @@ impl<'a> ResourcePathsIter<'a> {
270270
}
271271
}
272272

273-
impl<'a> Iterator for ResourcePaths<'a> {
273+
impl Iterator for ResourcePaths<'_> {
274274
type Item = crate::Result<PathBuf>;
275275

276276
fn next(&mut self) -> Option<crate::Result<PathBuf>> {
277277
self.iter.next().map(|r| r.map(|res| res.path))
278278
}
279279
}
280280

281-
impl<'a> Iterator for ResourcePathsIter<'a> {
281+
impl Iterator for ResourcePathsIter<'_> {
282282
type Item = crate::Result<Resource>;
283283

284284
fn next(&mut self) -> Option<crate::Result<Resource>> {

crates/tauri/src/ipc/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub struct Request<'a> {
145145
headers: &'a HeaderMap,
146146
}
147147

148-
impl<'a> Request<'a> {
148+
impl Request<'_> {
149149
/// The request body.
150150
pub fn body(&self) -> &InvokeBody {
151151
self.body

crates/tauri/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ pub mod test;
10441044
const _: () = {
10451045
use specta::{datatype::DataType, function::FunctionArg, TypeMap};
10461046

1047-
impl<'r, T: Send + Sync + 'static> FunctionArg for crate::State<'r, T> {
1047+
impl<T: Send + Sync + 'static> FunctionArg for crate::State<'_, T> {
10481048
fn to_datatype(_: &mut TypeMap) -> Option<DataType> {
10491049
None
10501050
}

0 commit comments

Comments
 (0)