aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-09-17 03:04:45 +0200
committerTeddy Wing2020-09-17 03:04:45 +0200
commitbe7ba88e7d746936b7bc3ccd0ea83f46937610fe (patch)
tree38ec82e80db80d351c463b351c2324d6dff8b557
parente6dee128a2e1cf051fd4f8f2ee810ee0a9a3c7c0 (diff)
downloadgit-todo-be7ba88e7d746936b7bc3ccd0ea83f46937610fe.tar.bz2
lib.rs: Add doc comments
-rw-r--r--src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 1505711..c408750 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -18,6 +18,13 @@ pub struct Todos<'a> {
}
impl Todos<'_> {
+ /// Write TODO lines.
+ ///
+ /// Writes TODO lines since `tree` to `write_to`.
+ ///
+ /// # Panics
+ ///
+ /// Panics if writing to `write_to` fails.
pub fn write_since<W: Write>(
&self,
tree: Tree<'_>,
@@ -57,6 +64,7 @@ impl Todos<'_> {
Ok(())
}
+ /// Get a Git tree for the master branch.
pub fn master_tree(&self) -> Result<Tree<'_>, Error> {
let master = self.repo.find_branch("master", git2::BranchType::Local)?;