docs: add docstrings to two methods

This commit is contained in:
steven-omaha
2023-04-28 14:28:17 +02:00
parent 08f9a9305c
commit 12c9a743ff
2 changed files with 12 additions and 0 deletions
@@ -6,6 +6,11 @@ use anyhow::{bail, ensure, Context, Result};
use super::Backend; use super::Backend;
use crate::Package; use crate::Package;
/// A vector of tuples containing a `dyn Backend` and a vector of unmanaged packages
/// for that backend.
///
/// This struct is used to store a list of unmanaged packages or missing packages
/// for all backends.
#[derive(Debug)] #[derive(Debug)]
pub struct ToDoPerBackend(Vec<(Box<dyn Backend>, Vec<Package>)>); pub struct ToDoPerBackend(Vec<(Box<dyn Backend>, Vec<Package>)>);
+7
View File
@@ -178,6 +178,13 @@ impl Pacdef {
.context("printing things to do") .context("printing things to do")
} }
/// Get a list of unmanaged packages per backend.
///
/// This method loops through all enabled `Backend`s whose binary is in `PATH`.
///
/// # Errors
///
/// This function will propagate errors.
fn get_unmanaged_packages(&mut self) -> Result<ToDoPerBackend> { fn get_unmanaged_packages(&mut self) -> Result<ToDoPerBackend> {
let mut result = ToDoPerBackend::new(); let mut result = ToDoPerBackend::new();