We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5092589 + 646e359 commit dc62c46Copy full SHA for dc62c46
src/cli/args.rs
@@ -58,6 +58,27 @@ impl Args {
58
pub fn parse() -> Result<Self, clap::Error> {
59
Self::try_parse()
60
}
61
+
62
+ /// Create Args directly (for API/library use).
63
+ pub fn new(
64
+ old: PathBuf,
65
+ new: PathBuf,
66
+ key: Option<String>,
67
+ threshold: f64,
68
+ tolerance: f64,
69
+ delimiter: Option<u8>,
70
+ json: bool,
71
+ ) -> Self {
72
+ Self {
73
+ old,
74
+ new,
75
+ key,
76
+ threshold,
77
+ tolerance,
78
+ delimiter,
79
+ json,
80
+ }
81
82
83
84
fn parse_threshold(raw: &str) -> Result<f64, String> {
0 commit comments