Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
maddymakesgames committed Jan 21, 2025
1 parent 6f1a00b commit 3b41591
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gui/src/editor/level_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl<'a> EditorTab<'a> for LevelSetsTab<'a> {
}
}

impl<'a> LevelSetsTab<'a> {
impl LevelSetsTab<'_> {
pub fn show_modded(self, ui: &mut Ui, data: &mut LevelSetsData) {
let row_height = ui.text_style_height(&TextStyle::Body);

Expand Down
2 changes: 1 addition & 1 deletion gui/src/editor/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl<'a> EditorTab<'a> for MetadataTab<'a> {
}

// TODO: add summit gems
impl<'a> MetadataTab<'a> {
impl MetadataTab<'_> {
pub fn show_flags(&mut self, ui: &mut Ui) {
let met_theo = self.flags.contains(&VanillaFlags::MetTheo.into());
let mut met_theo2 = met_theo;
Expand Down
2 changes: 1 addition & 1 deletion gui/src/editor/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<'a> EditorTab<'a> for OperationsTab<'a> {
}
}

impl<'a> OperationsTab<'a> {
impl OperationsTab<'_> {
fn save_file(
&self,
data: &mut OperationsData,
Expand Down
2 changes: 1 addition & 1 deletion gui/src/editor/sessions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl<'a> EditorTab<'a> for SessionsTab<'a> {
}
}

impl<'a> SessionsTab<'a> {
impl SessionsTab<'_> {
#[allow(clippy::too_many_arguments)]
fn show_session_impl(
ui: &mut Ui,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/maps/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct MapEncoder<'a> {
pub(crate) attrs: Vec<MapAttribute>,
}

impl<'a> MapEncoder<'a> {
impl MapEncoder<'_> {
/// Sets the name of the raw element
///
/// This is already done when creating the [MapEncoder] so this
Expand Down
2 changes: 1 addition & 1 deletion lib/src/maps/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct MapParser<'a> {
pub(crate) parsers: &'a HashMap<&'static str, Box<dyn ElementParserImpl>>,
}

impl<'a> MapParser<'a> {
impl MapParser<'_> {
/// Parses `T` without forking, needed to parse the map root properly
pub(crate) fn parse_self<T: MapElement>(self) -> Result<T, MapElementParsingError> {
T::from_raw(self)
Expand Down
2 changes: 1 addition & 1 deletion lib/src/maps/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<'a> Deref for MapReader<'a> {
}
}

impl<'a> DerefMut for MapReader<'a> {
impl DerefMut for MapReader<'_> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.reader
}
Expand Down
1 change: 0 additions & 1 deletion lib/src/saves/def/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ pub struct AreaDef {
pub cassette: bool,
#[serde(rename = "@SID")]
/// Is `None` in a non-modded save
#[serde(skip_serializing_if = "Option::is_none")]
pub sid: Option<String>,
}
Expand Down

0 comments on commit 3b41591

Please sign in to comment.