aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-08-17 22:32:56 +0200
committerHampusM <hampus@hampusmat.com>2023-08-17 22:32:56 +0200
commitca7cb248bfdebfda1658f0c756db42d779cff030 (patch)
tree2fdf50eb6a5d55df889ebbeed3dcb8d02c770e21
parentdd3c988d8734f5ff6b2f0a528224ca26db1b402b (diff)
feat: add DependencyHistory methods to public API
-rw-r--r--src/dependency_history.rs7
1 files 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<Dependency: 'static + ?Sized>(&mut self)
{
self.inner.push(type_name::<Dependency>());
}
- #[doc(hidden)]
+ /// Returns whether or not a dependency is present in the history.
#[allow(clippy::must_use_candidate)]
pub fn contains<Dependency: 'static + ?Sized>(&self) -> bool
{