Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rfuzzo committed May 31, 2024
1 parent 09a6389 commit 006d37c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gui/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl eframe::App for TemplateApp {
self.plugin_filter = String::new();
} else {
// add notes to filter
self.plugin_filter = mod_name.clone();
self.plugin_filter.clone_from(mod_name);
}
}
});
Expand Down Expand Up @@ -435,7 +435,7 @@ impl eframe::App for TemplateApp {
frame.frame.fill = bg_color;

// update hover filter
self.plugin_hover_filter = w.get_plugins().clone();
self.plugin_hover_filter.clone_from(&w.get_plugins());
} else {
self.plugin_hover_filter = vec![];
}
Expand Down
8 changes: 6 additions & 2 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,13 @@ impl Parser {
let mut tokens: Vec<String> = vec![];

// ignore everything after ;
let mut line = line.clone();
let line = line.clone();
if line.contains(';') {
line = line.split(';').next().unwrap_or("").trim().to_owned();
line.split(';')
.next()
.unwrap_or("")
.trim()
.clone_into(&mut line.to_owned());
}

let mut is_quoted = false;
Expand Down
4 changes: 2 additions & 2 deletions src/sorter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ impl Sorter {
for er in &err {
error!("cycles:");
for e in er {
error!("\t{}: {}", e, index_dict_rev[&e]);
res.push(index_dict_rev[&e].clone());
error!("\t{}: {}", e, index_dict_rev[e]);
res.push(index_dict_rev[e].clone());
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unit_rules_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ mod unit_tests {
#[test]
fn test_order_case() {
{
let mods = vec![
let mods = [
"a.esp".to_string(),
"b.ESP".to_string(),
"c.esp".to_string(),
Expand Down

0 comments on commit 006d37c

Please sign in to comment.