|
17 | 17 |
|
18 | 18 | assert_one_feature!("discord_client", "console_client");
|
19 | 19 | assert_one_feature!("mongo_db", "memory_db");
|
20 |
| -assert_one_feature!("plot_plotters", "plot_matplotlib"); |
| 20 | +assert_one_feature!("plot_plotters", "plot_matplotlib", "plot_charming"); |
21 | 21 |
|
22 | 22 | fn setup_sentry() -> Option<ClientInitGuard> {
|
23 | 23 | let Ok(sentry_dsn) = env_var("SENTRY_DSN") else {
|
@@ -75,6 +75,8 @@ async fn async_main() -> Result<()> {
|
75 | 75 | let plotter = plot::plotters::Plotters::new();
|
76 | 76 | #[cfg(feature = "plot_matplotlib")]
|
77 | 77 | let plotter = plot::plotters::Matplotlib::new();
|
| 78 | + #[cfg(feature = "plot_charming")] |
| 79 | + let plotter = plot::charming::Charming::new(); |
78 | 80 |
|
79 | 81 | let pgp_whitelist = env_var("PGP_SOURCE_DOMAIN_WHITELIST")?
|
80 | 82 | .split(',')
|
@@ -121,6 +123,56 @@ macro_rules! assert_one_feature {
|
121 | 123 | " feature."
|
122 | 124 | ));
|
123 | 125 | };
|
| 126 | + ($a:literal, $b:literal, $c:literal) => { |
| 127 | + #[cfg(all(feature = $a, feature = $b, feature = $c))] |
| 128 | + compile_error!(concat!( |
| 129 | + "You can't enable both of ", |
| 130 | + $a, |
| 131 | + " and ", |
| 132 | + $b, |
| 133 | + " and ", |
| 134 | + $c, |
| 135 | + " feature at the same time." |
| 136 | + )); |
| 137 | + |
| 138 | + #[cfg(all(feature = $a, feature = $b))] |
| 139 | + compile_error!(concat!( |
| 140 | + "You can't enable both of ", |
| 141 | + $a, |
| 142 | + " and ", |
| 143 | + $b, |
| 144 | + " feature at the same time." |
| 145 | + )); |
| 146 | + |
| 147 | + #[cfg(all(feature = $b, feature = $c))] |
| 148 | + compile_error!(concat!( |
| 149 | + "You can't enable both of ", |
| 150 | + $b, |
| 151 | + " and ", |
| 152 | + $c, |
| 153 | + " feature at the same time." |
| 154 | + )); |
| 155 | + |
| 156 | + #[cfg(all(feature = $c, feature = $a))] |
| 157 | + compile_error!(concat!( |
| 158 | + "You can't enable both of ", |
| 159 | + $c, |
| 160 | + " and ", |
| 161 | + $a, |
| 162 | + " feature at the same time." |
| 163 | + )); |
| 164 | + |
| 165 | + #[cfg(not(any(feature = $a, feature = $b, feature = $c)))] |
| 166 | + compile_error!(concat!( |
| 167 | + "You must enable either ", |
| 168 | + $a, |
| 169 | + " or ", |
| 170 | + $b, |
| 171 | + " or ", |
| 172 | + $c, |
| 173 | + " feature." |
| 174 | + )); |
| 175 | + }; |
124 | 176 | }
|
125 | 177 |
|
126 | 178 | use assert_one_feature;
|
0 commit comments