From d8e234e207b44a18d1a0fbc6a313923cca4d2e81 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Tue, 30 Jul 2024 11:41:01 +0200 Subject: [PATCH] fix: Remove debug prints that slipped in --- rubicon/src/lib.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/rubicon/src/lib.rs b/rubicon/src/lib.rs index b8b1515..8c82d8c 100644 --- a/rubicon/src/lib.rs +++ b/rubicon/src/lib.rs @@ -423,7 +423,6 @@ macro_rules! compatibility_check { } pub fn check_compatibility() { - eprintln!("Entering check_compatibility function"); let imported: &[(&str, &str)] = &[ ("rustc-version", $crate::RUBICON_RUSTC_VERSION), ("target-triple", $crate::RUBICON_TARGET_TRIPLE), @@ -431,18 +430,14 @@ macro_rules! compatibility_check { ]; let exported = unsafe { COMPATIBILITY_INFO }; - eprintln!("Comparing imported and exported compatibility info"); let missing: Vec<_> = imported.iter().filter(|&item| !exported.contains(item)).collect(); let extra: Vec<_> = exported.iter().filter(|&item| !imported.contains(item)).collect(); if missing.is_empty() && extra.is_empty() { - eprintln!("No compatibility issues found"); - // all good return; } - eprintln!("Compatibility issues detected, preparing error message"); let so_name = get_shared_object_name().unwrap_or("unknown_so".to_string()); // get only the last bit of the path let so_name = so_name.rsplit('/').next().unwrap_or("unknown_so"); @@ -455,7 +450,6 @@ macro_rules! compatibility_check { error_message.push_str(&format!("{} has an incompatible configuration for {}.\n\n", blue(so_name), red(env!("CARGO_PKG_NAME")))); - eprintln!("Calculating column widths for grid display"); // Compute max lengths for alignment let max_exported_len = exported.iter().map(|(k, v)| format!("{}={}", k, v).len()).max().unwrap_or(0); let max_ref_len = imported.iter().map(|(k, v)| format!("{}={}", k, v).len()).max().unwrap_or(0); @@ -523,7 +517,6 @@ macro_rules! compatibility_check { } } - eprintln!("Creating grid for compatibility info display"); let mut grid = Grid::new(); // Add header @@ -553,7 +546,6 @@ macro_rules! compatibility_check { grid.add_row(vec![key_column, binary_column, module_column]); } - eprintln!("Writing grid to error message"); grid.write_to(&mut error_message); struct MessageBox { @@ -603,7 +595,6 @@ macro_rules! compatibility_check { error_message.push_str("More info: \x1b[4m\x1b[34mhttps://crates.io/crates/rubicon\x1b[0m\n"); - eprintln!("Creating message box for additional information"); let mut message_box = MessageBox::new(); message_box.add_line(format!("To fix this issue, {} needs to enable", blue(so_name))); message_box.add_line(format!("the same cargo features as {} for crate {}.", blue(&exe_name), red(env!("CARGO_PKG_NAME")))); @@ -614,7 +605,6 @@ macro_rules! compatibility_check { message_box.write_to(&mut error_message); error_message.push_str("\n\x1b[31m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\x1b[0m\n"); - eprintln!("Panicking with error message"); panic!("{}", error_message); } };