Skip to content

Commit

Permalink
Remove extra GPU line
Browse files Browse the repository at this point in the history
  • Loading branch information
Loudbooks committed Apr 15, 2024
1 parent 5c9a96a commit e522838
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,19 @@ Reports will be uploaded to a pastebin, to expire after nine hours.
let mut gpu_str = String::new();
let spaces = INFORMATION_SPACES - id.len();

for graphics in gpus {
let mut index = 0;
for graphics in &gpus {
let str = graphics.name.to_string();

gpu_str.push_str(
format!("{}{}{}\n", id, " ".repeat(spaces).as_str(), str.as_str()).as_str(),
)
format!("{}{}{}", id, " ".repeat(spaces).as_str(), str.as_str()).as_str(),
);

if index < &gpus.len() - 1 {
gpu_str.push_str("\n");
}

index += 1;
}

gpu_str
Expand Down

0 comments on commit e522838

Please sign in to comment.