Skip to content

Commit

Permalink
fix: improved search results for ryzen PRO cpus
Browse files Browse the repository at this point in the history
  • Loading branch information
zleyyij committed Jan 30, 2024
1 parent 27302b8 commit d4ef13a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ fn find_model(input: &str) -> String {
}
}

//
// Ryzen PRO cpus have the same model, they're a different lineup though.
// This is handled by taping PRO to the model
{
if input.contains("AMD") && input.contains("PRO") {
return format!("PRO {}", best_fit);
}
}

best_fit.to_string()
}

Expand Down Expand Up @@ -170,7 +177,7 @@ mod tests {
("AMD Ryzen™ 5 5600", "AMD Ryzen 5 5600 6-Core Processor"),
("AMD Ryzen™ 5 2600", "AMD Ryzen 5 2600 Six-Core Processor"),
("AMD Ryzen™ 5 7600", "AMD Ryzen 5 7600 6-Core Processor"),
// ("AMD Ryzen™ 5 7530U", "AMD Ryzen 5 7530U with Radeon Graphics"),
("AMD Ryzen™ 5 7530U", "AMD Ryzen 5 7530U with Radeon Graphics"),
(
"Intel® Core™ i9-9900K Processor",
"Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz",
Expand Down

0 comments on commit d4ef13a

Please sign in to comment.