aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package/version
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/package/version')
-rw-r--r--crates/shirabe/src/package/version/version_bumper.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/shirabe/src/package/version/version_bumper.rs b/crates/shirabe/src/package/version/version_bumper.rs
index c0e76520..fcdbf246 100644
--- a/crates/shirabe/src/package/version/version_bumper.rs
+++ b/crates/shirabe/src/package/version/version_bumper.rs
@@ -112,10 +112,12 @@ impl VersionBumper {
} else {
format!("{}{}", new_pretty_constraint, suffix)
};
- let offset = match_offset as usize;
- let length = Platform::strlen(match_str) as usize;
- modified =
- shirabe_php_shim::substr_replace(&modified, &replacement, offset, length);
+ modified = shirabe_php_shim::substr_replace(
+ &modified,
+ &replacement,
+ match_offset,
+ Some(Platform::strlen(match_str)),
+ );
}
let new_constraint = parser.parse_constraints(&modified)?;