From b93ca7c02b8d96963ba12981ce25de27b808af00 Mon Sep 17 00:00:00 2001 From: Alexander Mohr Date: Sun, 25 May 2025 12:40:41 +0200 Subject: [PATCH 1/2] replace main with master in github action --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e9f17b3..3742c89 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [ "main" ] + branches: [ "master" ] pull_request: - branches: [ "main" ] + branches: [ "master" ] env: CARGO_TERM_COLOR: always From d75bd1b7663be25f4aa2512117b6a209413e5774 Mon Sep 17 00:00:00 2001 From: Alexander Mohr Date: Sun, 25 May 2025 12:41:46 +0200 Subject: [PATCH 2/2] fix format --- src/internal_structs.rs | 5 +---- src/parser.rs | 16 ++++++++-------- src/structs.rs | 4 ++-- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/internal_structs.rs b/src/internal_structs.rs index 227395b..32538a9 100644 --- a/src/internal_structs.rs +++ b/src/internal_structs.rs @@ -183,10 +183,7 @@ pub fn vec_to_map( Some(n) => n.try_into()?, None => { return Err(ParseError::KeyError { - msg: format!( - "The name of the action {} must be specified", - name - ), + msg: format!("The name of the action {} must be specified", name), }) } }, diff --git a/src/parser.rs b/src/parser.rs index 3ee5706..7061fa0 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -296,19 +296,19 @@ fn set_optional_locale_str( *opt = Some(inner); }; Ok(()) - }, + } } } fn set_bool(parts: LinePart, val: &mut bool) -> Result<(), ParseError> { *val = parts - .value - .parse::() - .map_err(|_| ParseError::Syntax { - msg: "Property's value needs to be bool".into(), - row: parts.line_number, - col: 0, - })?; + .value + .parse::() + .map_err(|_| ParseError::Syntax { + msg: "Property's value needs to be bool".into(), + row: parts.line_number, + col: 0, + })?; Ok(()) } diff --git a/src/structs.rs b/src/structs.rs index d84908e..315cd88 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -2,8 +2,8 @@ //! [freedesktop.org Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/). //! Desktop entries are used to describe applications, shortcuts, and directories in desktop environments. -use std::{collections::HashMap, path::PathBuf, str::FromStr}; use std::fmt::Display; +use std::{collections::HashMap, path::PathBuf, str::FromStr}; use thiserror::Error; /// A string that can have different values based on the system locale. @@ -117,7 +117,7 @@ pub struct LinkFields { /// The type of desktop entry, which determines its behavior and required fields. #[derive(Debug, Clone, Default)] -// Clippy suggests using Box for Application instead +// Clippy suggests using Box for Application instead // but this would break compatibility, so we disable the warning. #[allow(clippy::large_enum_variant)] pub enum EntryType {