@@ -4,7 +4,7 @@ use crate::*;
44///
55/// # Arguments
66///
7- /// - `&str`: The version string to parse (e.g., "0.1.2 " or "0.1.2 -alpha")
7+ /// - `&str`: The version string to parse (e.g., "0.1.0 " or "0.1.0 -alpha")
88///
99/// # Returns
1010///
@@ -79,7 +79,7 @@ fn get_next_prerelease(current: Option<&String>, target_type: &str) -> String {
7979///
8080/// # Returns
8181///
82- /// - `String`: Version string (e.g., "0.1.2 " or "0.1.2 -alpha")
82+ /// - `String`: Version string (e.g., "0.1.0 " or "0.1.0 -alpha")
8383fn version_to_string ( version : & Version ) -> String {
8484 let base: String = format ! ( "{}.{}.{}" , version. major, version. minor, version. patch) ;
8585 match & version. prerelease {
@@ -93,12 +93,12 @@ fn version_to_string(version: &Version) -> String {
9393/// # Arguments
9494///
9595/// - `&Version`: The current version
96- /// - `BumpVersionType`: The type of version bump to apply
96+ /// - `& BumpVersionType`: The type of version bump to apply
9797///
9898/// # Returns
9999///
100100/// - `Version`: The new version after bumping
101- fn bump_version ( version : & Version , bump_type : BumpVersionType ) -> Version {
101+ fn bump_version ( version : & Version , bump_type : & BumpVersionType ) -> Version {
102102 match bump_type {
103103 BumpVersionType :: Patch => Version {
104104 major : version. major ,
@@ -183,14 +183,14 @@ fn find_version_position(line: &str) -> Option<(usize, usize)> {
183183/// # Arguments
184184///
185185/// - `&str`: Path to Cargo.toml file
186- /// - `BumpVersionType`: Type of version bump to apply
186+ /// - `& BumpVersionType`: Type of version bump to apply
187187///
188188/// # Returns
189189///
190190/// - `Result<String, Box<dyn std::error::Error>>`: The new version string or an error
191191pub ( crate ) fn execute_bump (
192192 manifest_path : & str ,
193- bump_type : BumpVersionType ,
193+ bump_type : & BumpVersionType ,
194194) -> Result < String , Box < dyn std:: error:: Error > > {
195195 let path: & Path = Path :: new ( manifest_path) ;
196196 let content: String = read_to_string ( path) ?;
0 commit comments