use crate::statement_words;
use asterust::config::ConfigLine;
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[non_exhaustive]
pub struct RemovePrivate {
pub all: bool,
pub replace: bool,
pub nearest: bool,
pub no_peer_loop_check: bool,
}
pub(super) fn parse_remove_private(line: &ConfigLine) -> Option<RemovePrivate> {
let words = statement_words(line, "remove-private")?;
Some(RemovePrivate {
all: words.contains(&"all"),
replace: words.contains(&"replace"),
nearest: words.contains(&"nearest"),
no_peer_loop_check: words.contains(&"no-peer-loop-check"),
})
}