Skip to content

Commit

Permalink
Merge pull request #127 from mgeisler/update-toml
Browse files Browse the repository at this point in the history
Update `toml` to latest version
  • Loading branch information
mgeisler authored Sep 9, 2023
2 parents 7e68cea + e47e76e commit 7c9780b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pulldown-cmark = { version = "0.9.1", default-features = false, optional = true
semver = { version = "1.0.5", optional = true }
syn = { version = "2.0.15", default-features = false, features = ["parsing", "printing", "full"], optional = true }
proc-macro2 = { version = "1.0.36", default-features = false, features = ["span-locations"], optional = true }
toml = { version = "0.5.8", optional = true }
toml = { version = "0.7.8", optional = true }
url = { version = "2.2.2", optional = true }
regex = { version = "1.5.4", default-features = false, features = ["std", "unicode"], optional = true }

Expand Down
8 changes: 2 additions & 6 deletions src/markdown_deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn extract_version_request(pkg_name: &str, block: &str) -> Result<VersionReq> {
None => Err(format!("no dependency on {}", pkg_name)),
}
}
Err(err) => Err(format!("TOML parse error: {}", err)),
Err(err) => Err(format!("{}", err)),
}
}

Expand Down Expand Up @@ -304,11 +304,7 @@ mod tests {
let block = "[dependencies]\n\
foobar = 1.5.8";
let request = extract_version_request("foobar", block);
// toml 0.5.3 returns "found a period at line 2 column 13.
// Update the test when we bump the toml crate dependency.
assert!(request
.unwrap_err()
.contains("TOML parse error: expected newline, found a period at line 2"));
assert!(request.is_err());
}

#[test]
Expand Down

0 comments on commit 7c9780b

Please sign in to comment.