Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
svenstaro committed Mar 28, 2024
1 parent 4482c08 commit 261ebec
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions src/modules/julia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,42 +317,41 @@ async fn report_packages(packages: &[&Package<'_>]) {
for package in packages {
if package.versions.len() > 1 && rng.gen_bool(0.75) {
// update package
let package_id = format!("[{}]", &package.id[0..8]);
let version_change = format!(
"↑ {} v{} ⇒ v{}",
package.name,
package.versions[rng.gen_range(0..package.versions.len() - 1)],
package.versions.last().unwrap()
);
print(format!(
" {} {}",
format!("[{}]", &package.id[0..8]).fixed(8),
format!(
"↑ {} v{} ⇒ v{}",
package.name,
package.versions[rng.gen_range(0..package.versions.len() - 1)],
package.versions.last().unwrap()
)
.fixed(11)
package_id.fixed(8),
version_change.fixed(11)
))
.await;
newline().await;
} else if rng.gen_bool(0.9) {
// add package
let package_id = format!("[{}]", &package.id[0..8]);
let version_change =
format!("+ {} v{}", package.name, package.versions.last().unwrap());
print(format!(
" {} {}",
format!("[{}]", &package.id[0..8]).fixed(8),
format!(
"+ {} v{}",
package.name,
package.versions.last().unwrap().fixed(10)
)
package_id.fixed(8),
version_change.fixed(10)
))
.await;
newline().await;
} else {
// remove package
let package_id = format!("[{}]", &package.id[0..8]);
let version_change =
format!("- {} v{}", package.name, package.versions.last().unwrap());
print(format!(
" {} {}",
format!("[{}]", &package.id[0..8]).fixed(8),
format!(
"- {} v{}",
package.name,
package.versions.last().unwrap().fixed(9)
)
package_id.fixed(8),
version_change.fixed(9)
))
.await;
newline().await;
Expand Down

0 comments on commit 261ebec

Please sign in to comment.