Commit 50a972db6f
Unsigned
Layout: unified · split
src/config_macros.rs +3
| @@ -38,6 +38,7 @@ macro_rules! option_create { | ||
| 38 | 38 | macro_rules! option_getter { |
| 39 | 39 | ($option_type:ident, $option_name:ident, $output_type:ty) => { |
| 40 | 40 | paste::item! { |
| 41 | #[allow(dead_code)] | |
| 41 | 42 | pub fn [<$option_name>](&self) -> $output_type { |
| 42 | 43 | let option_name = stringify!($option_name); |
| 43 | 44 | |
| @@ -251,6 +252,7 @@ macro_rules! config { | ||
| 251 | 252 | #[allow(unused_imports)] |
| 252 | 253 | use strum::VariantNames; |
| 253 | 254 | use std::ops::{Deref, DerefMut}; |
| 255 | #[allow(unused_imports)] | |
| 254 | 256 | use weechat::config::{ |
| 255 | 257 | SectionHandle, SectionHandleMut, StringOptionSettings, |
| 256 | 258 | ConfigOption, ConfigSection, ConfigSectionSettings, |
| @@ -292,6 +294,7 @@ macro_rules! config { | ||
| 292 | 294 | |
| 293 | 295 | paste::item! { |
| 294 | 296 | $( |
| 297 | #[allow(dead_code)] | |
| 295 | 298 | pub fn $section(&self) -> [<$section:camel Section>] { |
| 296 | 299 | let section_name = stringify!($section); |
| 297 | 300 | let section = self.0.search_section(section_name) |