We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
impl From<String> for ChangeType
1 parent 718c4aa commit dd81675Copy full SHA for dd81675
1 file changed
src/versioning.rs
@@ -148,6 +148,17 @@ impl From<&str> for ChangeType {
148
}
149
150
151
+impl From<String> for ChangeType {
152
+ fn from(s: String) -> Self {
153
+ match s.as_str() {
154
+ "patch" => ChangeType::Patch,
155
+ "minor" => ChangeType::Minor,
156
+ "major" => ChangeType::Major,
157
+ _ => ChangeType::Custom(s),
158
+ }
159
160
+}
161
+
162
impl Ord for ChangeType {
163
fn cmp(&self, other: &Self) -> Ordering {
164
match (self, other) {
0 commit comments