summaryrefslogtreecommitdiffstats
path: root/src/db/model/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/model/state.rs')
-rw-r--r--src/db/model/state.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/db/model/state.rs b/src/db/model/state.rs
index 4882428..777840f 100644
--- a/src/db/model/state.rs
+++ b/src/db/model/state.rs
@@ -53,7 +53,7 @@ impl CandidateState {
}
}
- pub fn predecessors(to: CandidateState) -> Vec<&'static str> {
+ pub(crate) fn predecessors(to: CandidateState) -> Vec<&'static str> {
CandidateState::ALL
.iter()
.filter(|from| from.can_transition(to))
@@ -118,10 +118,9 @@ impl std::fmt::Display for ReleaseState {
}
}
-pub trait StateEnum: Copy + Sized {
+pub(crate) trait StateEnum: Copy + Sized {
const KIND: &'static str;
fn parse(text: &str) -> Option<Self>;
- fn as_str(&self) -> &'static str;
}
macro_rules! impl_state_enum {
@@ -131,9 +130,6 @@ macro_rules! impl_state_enum {
fn parse(text: &str) -> Option<Self> {
<$t>::parse(text)
}
- fn as_str(&self) -> &'static str {
- <$t>::as_str(self)
- }
}
};
}
@@ -147,12 +143,8 @@ impl_state_enum!(SubscriptionState, "subscription");
pub mod notice_kind {
pub const PIN_DRIFT: &str = "pin_drift";
pub const RECIPE_DRIFT: &str = "recipe_drift";
- pub const DIGEST_DRIFT: &str = "digest_drift";
pub const INTEGRITY_ALERT: &str = "integrity_alert";
- pub const UNPINABLE_PKGVER: &str = "unpinable_pkgver";
- pub const ORPHANED: &str = "orphaned";
pub const DELETED: &str = "deleted";
- pub const RENAMED: &str = "renamed";
pub const DOWNGRADE: &str = "downgrade";
}