If any experimental flags are active, prints a warning to stderr.
(&self)
| 42 | |
| 43 | /// If any experimental flags are active, prints a warning to stderr. |
| 44 | pub fn warn_if_active(&self) { |
| 45 | let flags = self.active_flags(); |
| 46 | if flags.is_empty() { |
| 47 | return; |
| 48 | } |
| 49 | |
| 50 | let flag_list = flags |
| 51 | .iter() |
| 52 | .map(|f| style(*f).bold().to_string()) |
| 53 | .collect::<Vec<_>>() |
| 54 | .join(", "); |
| 55 | |
| 56 | eprintln!( |
| 57 | "\n {} Experimental flags enabled: {}\n \ |
| 58 | These may change or be removed without notice.\n \ |
| 59 | Share feedback at {}.\n", |
| 60 | style(Icon::Warning.to_string()).yellow(), |
| 61 | flag_list, |
| 62 | style("https://github.com/CodSpeedHQ/codspeed/issues").underlined(), |
| 63 | ); |
| 64 | } |
| 65 | } |
no test coverage detected