From ca7cb248bfdebfda1658f0c756db42d779cff030 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 17 Aug 2023 22:32:56 +0200 Subject: feat: add DependencyHistory methods to public API --- src/dependency_history.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dependency_history.rs b/src/dependency_history.rs index 81d5434..e5b2aea 100644 --- a/src/dependency_history.rs +++ b/src/dependency_history.rs @@ -24,8 +24,9 @@ pub struct DependencyHistory impl DependencyHistory { + /// Returns a new `DependencyHistory`. #[must_use] - pub(crate) fn new() -> Self + pub fn new() -> Self { Self { inner: vec![] } } @@ -34,13 +35,13 @@ impl DependencyHistory #[cfg_attr(test, mockall::automock)] impl DependencyHistory { - #[doc(hidden)] + /// Adds a dependency to the history. pub fn push(&mut self) { self.inner.push(type_name::()); } - #[doc(hidden)] + /// Returns whether or not a dependency is present in the history. #[allow(clippy::must_use_candidate)] pub fn contains(&self) -> bool { -- cgit v1.2.3-18-g5258