Skip to content

Commit 159dcbc

Browse files
committed
Fix string handling for version numbers
1 parent 6ec43df commit 159dcbc

File tree

1 file changed

+1
-1
lines changed
  • source/tools/bump_crate_versions/src

1 file changed

+1
-1
lines changed

source/tools/bump_crate_versions/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn read_toml_version(dir: &Path) -> String {
172172
let content = fs::read_to_string(&cargo_toml_path).expect(format!("Failed to read {}", cargo_toml_path.display()).as_str());
173173
let doc = content.parse::<DocumentMut>().expect("Failed to parse Cargo.toml");
174174

175-
doc["package"]["version"].to_string()
175+
doc["package"]["version"].as_str().expect("Version must be a string").to_string()
176176
}
177177

178178
fn update_toml_version(dir: &Path) {

0 commit comments

Comments
 (0)