Skip to content

Commit

Permalink
feat: add has_unstable helper method (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Oct 24, 2023
1 parent e3e13e5 commit ac9ed93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@ impl ConfigFile {
self.json.imports.is_some() || self.json.scopes.is_some()
}

pub fn has_unstable(&self, name: &str) -> bool {
self.json.unstable.iter().any(|v| v == name)
}

pub fn to_files_config(&self) -> Result<Option<FilesConfig>, AnyError> {
let mut exclude: Vec<String> =
if let Some(exclude) = self.json.exclude.clone() {
Expand Down

0 comments on commit ac9ed93

Please sign in to comment.