/// Bumps the major version and sets a pre-release alpha counter or bumps the pre-release counter
Bumps the major version and sets a pre-release alpha counter or bumps the pre-release counter
Bumps the major version and sets a pre - release alpha counter or bumps the pre - release counter
fn prerelease_bump(sem_version: Version) -> Version {
    let next_version = if !sem_version.pre.is_empty() {
        let mut next_version =
            Version::new(sem_version.major, sem_version.minor, sem_version.patch);
        let old_bump: i32 = sem_version.pre.split(".").collect::<Vec<&str>>()[1]
            .parse()
            .unwrap();
        next_version.pre = Prerelease::new(&*format!("alpha.{}", old_bump + 1)).unwrap();
        next_version
    } else {
        let mut next_version = Version::new(sem_version.major + 1, 0, 0);
        next_version.pre = Prerelease::new("alpha.1").unwrap();
        next_version
    };
    next_version
}
fn prerelease_bump ( sem_version : Version ) -> Version { let next_version = if ! sem_version . pre . is_empty ( ) { let mut next_version = Version :: new ( sem_version . major , sem_version . minor , sem_version . patch ) ; let old_bump : i32 = sem_version . pre . split ( " " ) . collect :: < Vec < & str > > ( ) [ 1 ] . parse ( ) . unwrap ( ) ; next_version . pre = Prerelease :: new ( & * format ! ( " " old_bump 1 ) ) . unwrap ( ) ; next_version } else { let mut next_version = Version :: new ( sem_version . major + 1 , 0 , 0 ) ; next_version . pre = Prerelease :: new ( " " ) . unwrap ( ) ; next_version } ; next_version }
Bumps the major version and sets a pre-release alpha counter or bumps the pre-release counter
Bumps the major version and sets a pre - release alpha counter or bumps the pre - release counter
sem_version
Version