Skip to content

Commit

Permalink
Maybe g.as_str() returns something that needs to be unwrapped before …
Browse files Browse the repository at this point in the history
…replace is called?

This is my second line of rust code ever written.
  • Loading branch information
krainboltgreene authored Jan 6, 2024
1 parent 5936f79 commit d70b359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn validate_globs(globs: &serde_json::Value, path: &str, state: &mut ValidationS

if let Some(globs) = globs.as_array() {
for g in globs {
match glob(g.as_str().replace("!", "").unwrap()) {
match glob(g.as_str().unwrap().replace("!", "")) {
Ok(res) => {
if res.count() == 0 {
state.errors.push(ValidationError::NoFilesMatchingGlob {
Expand Down

0 comments on commit d70b359

Please sign in to comment.