1
0
Fork 0
mirror of https://github.com/rust-unofficial/awesome-rust.git synced 2024-11-20 11:36:11 -05:00

Better debug for no valid github/crates link

This commit is contained in:
Tom Parker-Shemilt 2024-09-14 16:04:18 +01:00
parent e2a8e63b1d
commit 50d688d165

View file

@ -461,6 +461,7 @@ async fn main() -> Result<(), Error> {
let mut star_override_level: Option<u32> = None;
for (event, _range) in parser.into_offset_iter() {
debug!("Event {:?}", event);
match event {
Event::Start(tag) => {
match tag {
@ -578,10 +579,10 @@ async fn main() -> Result<(), Error> {
&& cargo_downloads.unwrap_or(0) < MINIMUM_CARGO_DOWNLOADS
{
if github_stars.is_none() {
warn!("No valid github link");
warn!("No valid github link for {list_item}");
}
if cargo_downloads.is_none() {
warn!("No valid crates link");
warn!("No valid crates link for {list_item}");
}
return Err(format_err!("Not high enough metrics ({:?} stars < {}, and {:?} cargo downloads < {}): {}", github_stars, required_stars, cargo_downloads, MINIMUM_CARGO_DOWNLOADS, list_item));
}