Skip to content

Commit

Permalink
fix: clippy warnings (#10415)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Jul 29, 2024
1 parent fbcbc5e commit b59b755
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
16 changes: 8 additions & 8 deletions core/tauri-utils/src/config/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub fn is_configuration_file(path: &Path) -> bool {
/// - `tauri.macos.conf.json[5]` on macOS
/// - `tauri.linux.conf.json[5]` on Linux
/// - `tauri.windows.conf.json[5]` on Windows
/// Merging the configurations using [JSON Merge Patch (RFC 7396)].
/// Merging the configurations using [JSON Merge Patch (RFC 7396)].
///
/// [JSON Merge Patch (RFC 7396)]: https://datatracker.ietf.org/doc/html/rfc7396.
pub fn read_from(root_dir: PathBuf) -> Result<Value, ConfigError> {
Expand Down Expand Up @@ -224,15 +224,15 @@ pub fn does_supported_file_name_exist(path: impl Into<PathBuf>) -> bool {
///
/// Hierarchy:
/// 1. Check if `tauri.conf.json` exists
/// a. Parse it with `serde_json`
/// b. Parse it with `json5` if `serde_json` fails
/// c. Return original `serde_json` error if all above steps failed
/// a. Parse it with `serde_json`
/// b. Parse it with `json5` if `serde_json` fails
/// c. Return original `serde_json` error if all above steps failed
/// 2. Check if `tauri.conf.json5` exists
/// a. Parse it with `json5`
/// b. Return error if all above steps failed
/// a. Parse it with `json5`
/// b. Return error if all above steps failed
/// 3. Check if `Tauri.json` exists
/// a. Parse it with `toml`
/// b. Return error if all above steps failed
/// a. Parse it with `toml`
/// b. Return error if all above steps failed
/// 4. Return error if all above steps failed
pub fn parse(path: impl Into<PathBuf>) -> Result<(Config, PathBuf), ConfigError> {
do_parse(path.into())
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/api/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ pub enum Sound {
/// if `ms-winsoundevent:Notification.Looping.Alarm2`, you would use `Alarm2`.
/// Windows 7 is not supported, if a sound is provided, it will play the default sound, otherwise it will be silent.
/// - **macOS**: you can specify the name of the sound you'd like to play when the notification is shown.
/// Any of the default sounds (under System Preferences > Sound) can be used, in addition to custom sound files.
/// Be sure that the sound file is under one of the following locations:
/// Any of the default sounds (under System Preferences > Sound) can be used, in addition to custom sound files.
/// Be sure that the sound file is under one of the following locations:
/// - `~/Library/Sounds`
/// - `/Library/Sounds`
/// - `/Network/Library/Sounds`
Expand Down
2 changes: 2 additions & 0 deletions core/tauri/src/endpoints/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub struct DialogFilter {
/// The options for the open dialog API.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(not(dialog_open), allow(dead_code))]
pub struct OpenDialogOptions {
/// The title of the dialog window.
pub title: Option<String>,
Expand All @@ -75,6 +76,7 @@ pub struct OpenDialogOptions {
/// The options for the save dialog API.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(not(dialog_save), allow(dead_code))]
pub struct SaveDialogOptions {
/// The title of the dialog window.
pub title: Option<String>,
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! - **custom-protocol**: Feature managed by the Tauri CLI. When enabled, Tauri assumes a production environment instead of a development one.
//! - **updater**: Enables the application auto updater. Enabled by default if the `updater` config is defined on the `tauri.conf.json` file.
//! - **devtools**: Enables the developer tools (Web inspector) and [`Window::open_devtools`]. Enabled by default on debug builds.
//! On macOS it uses private APIs, so you can't enable it if your app will be published to the App Store.
//! On macOS it uses private APIs, so you can't enable it if your app will be published to the App Store.
//! - **shell-open-api**: Enables the [`api::shell`] module.
//! - **http-api**: Enables the [`api::http`] module.
//! - **http-multipart**: Adds support to `multipart/form-data` requests.
Expand Down
6 changes: 3 additions & 3 deletions core/tauri/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ impl<R: Runtime> Window<R> {
/// ## Platform-specific
///
/// - **macOS:** Only supported on macOS 10.15+.
/// This is a private API on macOS, so you cannot use this if your application will be published on the App Store.
/// This is a private API on macOS, so you cannot use this if your application will be published on the App Store.
///
/// # Examples
///
Expand All @@ -1738,7 +1738,7 @@ impl<R: Runtime> Window<R> {
/// ## Platform-specific
///
/// - **macOS:** Only supported on macOS 10.15+.
/// This is a private API on macOS, so you cannot use this if your application will be published on the App Store.
/// This is a private API on macOS, so you cannot use this if your application will be published on the App Store.
/// - **Windows:** Unsupported.
///
/// # Examples
Expand Down Expand Up @@ -1771,7 +1771,7 @@ impl<R: Runtime> Window<R> {
/// ## Platform-specific
///
/// - **macOS:** Only supported on macOS 10.15+.
/// This is a private API on macOS, so you cannot use this if your application will be published on the App Store.
/// This is a private API on macOS, so you cannot use this if your application will be published on the App Store.
/// - **Windows:** Unsupported.
///
/// # Examples
Expand Down

0 comments on commit b59b755

Please sign in to comment.