Add StoreAction::as_commit_message() utility fn

This commit is contained in:
Matthias Beyer 2016-09-18 14:50:41 +02:00
parent 40dbdaa5e1
commit 9a4cdad9a1

View file

@ -19,6 +19,15 @@ impl StoreAction {
StoreAction::Delete => "DELETE",
}
}
pub fn as_commit_message(&self) -> &str {
match *self {
StoreAction::Create => "Create",
StoreAction::Retrieve => "Retrieve",
StoreAction::Update => "Update",
StoreAction::Delete => "Delete",
}
}
}
impl Display for StoreAction {