Skip to content

Commit

Permalink
fix: linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Mar 8, 2024
1 parent bd935b3 commit 094ab8a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,10 @@ impl TorrustIndex {
}

pub fn remove_secrets(&mut self) {
self.tracker.token = "***".to_owned();
self.database.connect_url = "***".to_owned();
self.mail.password = "***".to_owned();
self.auth.secret_key = "***".to_owned();
"***".clone_into(&mut self.tracker.token);
"***".clone_into(&mut self.database.connect_url);
"***".clone_into(&mut self.mail.password);
"***".clone_into(&mut self.auth.secret_key);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/models/torrent_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl TorrentInfoDictionary {
.first()
.expect("vector `torrent_files` should have at least one element");

info_dict.md5sum = torrent_file.md5sum.clone();
info_dict.md5sum.clone_from(&torrent_file.md5sum); // DevSkim: ignore DS126858

info_dict.length = Some(torrent_file.length);

Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ impl TestEnv {
pub fn server_settings_masking_secrets(&self) -> Option<Settings> {
match self.starting_settings.clone() {
Some(mut settings) => {
settings.tracker.token = "***".to_owned();
settings.database.connect_url = "***".to_owned();
settings.mail.password = "***".to_owned();
settings.auth.secret_key = "***".to_owned();
"***".clone_into(&mut settings.tracker.token);
"***".clone_into(&mut settings.database.connect_url);
"***".clone_into(&mut settings.mail.password);
"***".clone_into(&mut settings.auth.secret_key);
Some(settings)
}
None => None,
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/web/api/v1/contexts/torrent/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ mod for_guests {

// Upload the first torrent
let mut first_torrent = TestTorrent::with_custom_info_dict_field(id, &file_contents, "custom 01");
first_torrent.index_info.title = title.clone();
first_torrent.index_info.title.clone_from(&title);

let first_torrent_canonical_info_hash = upload_test_torrent(&client, &first_torrent)
.await
Expand Down Expand Up @@ -376,7 +376,7 @@ mod for_guests {

// Upload the first torrent
let mut first_torrent = TestTorrent::with_custom_info_dict_field(id, &file_contents, "custom 01");
first_torrent.index_info.title = title.clone();
first_torrent.index_info.title.clone_from(&title);

let first_torrent_canonical_info_hash = upload_test_torrent(&client, &first_torrent)
.await
Expand Down

0 comments on commit 094ab8a

Please sign in to comment.