Skip to content

Commit

Permalink
Update increment_version.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmatthes authored Jun 28, 2023
1 parent 54df751 commit 1e0443a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/increment_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct IncrementVersion {

/// The increment range.
#[arg(long, short)]
range: crate::VersionRange,
range: VersionRange,

/// In case of Rust projects: which package's version shall be edited?
#[arg(long, short = 'R')]
Expand All @@ -60,6 +60,22 @@ impl IncrementVersion {
self.wrap().main()
}

/// Construct a new instance.
#[must_use]
pub fn new(
file_to_edit: Vec<PathBuf>,
old_version: String,
range: VersionRange,
rust_package: Option<String>,
) -> Self {
Self {
file_to_edit,
old_version,
range,
rust_package,
}
}

fn wrap(&self) -> Logic {
Logic {
cli: self.clone(),
Expand Down

0 comments on commit 1e0443a

Please sign in to comment.