forked from Rativel/BurritOS
Fixed more clippy complaining
This commit is contained in:
@@ -55,7 +55,6 @@ impl Section{
|
||||
let len: usize = string_hex_to_usize(§ion.len);
|
||||
|
||||
let mut tmp_a: char = ' ';
|
||||
let mut tmp_b: char = ' ';
|
||||
|
||||
for (i, c) in section.content.chars().enumerate(){
|
||||
|
||||
@@ -63,8 +62,7 @@ impl Section{
|
||||
tmp_a = c;
|
||||
}
|
||||
else {
|
||||
tmp_b = c;
|
||||
content.push(two_hex_to_u8(tmp_a,tmp_b));
|
||||
content.push(two_hex_to_u8(tmp_a,c));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,7 +148,7 @@ impl MemChecker{
|
||||
let section_f = SectionFormat{
|
||||
addr: tmp_addr_str.clone(),
|
||||
len: tmp_len_str.clone(),
|
||||
content: current_line.clone().replace(" ", ""),
|
||||
content: current_line.clone().replace(' ', ""),
|
||||
};
|
||||
sections.push(Section::from(§ion_f));
|
||||
}
|
||||
@@ -172,7 +170,7 @@ impl MemChecker{
|
||||
|
||||
for(i,s) in m_c.sections.iter().enumerate() {
|
||||
println!("\nSection {}\n", i);
|
||||
Section::print_section(&s);
|
||||
Section::print_section(s);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -374,18 +372,6 @@ mod tests {
|
||||
assert_eq!(section.content, expected_vec);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mod(){
|
||||
let cond = (0%2) == 0;
|
||||
assert!(cond);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mod_2(){
|
||||
let cond = (1%2) == 1;
|
||||
assert!(cond);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hex_1(){
|
||||
let b = two_hex_to_u8('0', '0');
|
||||
|
||||
Reference in New Issue
Block a user