Skip to content

Commit

Permalink
Address warnings and clippy in new Rust version.
Browse files Browse the repository at this point in the history
  • Loading branch information
awaitlink committed Mar 11, 2024
1 parent 1c4a1ad commit 2a6b87c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/github/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub async fn get_commit(platform: Platform, sha: &str) -> anyhow::Result<Commit>
files: Some(Vec::new()),
},
|target, source| {
target.sha = source.sha.clone();
target.sha.clone_from(&source.sha);
target.commit = source.commit.clone();
if let Some(part_files) = &mut source.files {
target.files.as_mut().unwrap().append(part_files);
Expand Down Expand Up @@ -185,7 +185,7 @@ where

match link_header.get("next") {
Some(link) => {
url_string = link.raw_uri.clone();
url_string.clone_from(&link.raw_uri);
page += 1;
}
None => {
Expand Down
4 changes: 2 additions & 2 deletions src/localization/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ mod tests {

use super::*;
use crate::{
localization::{LocalizationChange, LocalizationChanges, StringsFileKind::*},
platform::Platform::{self, *},
localization::{LocalizationChange, StringsFileKind::*},
platform::Platform::*,
};

#[test_case(Android, "v1.2.3", "v1.2.4", Complete, vec![
Expand Down
2 changes: 1 addition & 1 deletion src/markdown/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ mod tests {
use test_case::test_case;

use super::*;
use crate::platform::Platform::{self, *};
use crate::platform::Platform::*;

#[test_case(true, "Updated language translations.")]
#[test_case(true, "Update strings")]
Expand Down
5 changes: 2 additions & 3 deletions src/markdown/post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,15 @@ Gathered from [{provider}]({comparison_url})
}

#[cfg(test)]
#[allow(clippy::too_many_arguments)]
mod tests {
#![allow(clippy::too_many_arguments)]

use pretty_assertions::assert_str_eq;
use test_case::test_case;

use super::*;
use crate::{
localization::{Completeness, LocalizationChange, LocalizationChanges, StringsFileKind::*},
platform::Platform::{self, *},
platform::Platform::*,
};

#[test_case(Android, "v1.2.3", "v1.2.4", None, vec![
Expand Down

0 comments on commit 2a6b87c

Please sign in to comment.