aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modderbaas/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/modderbaas/src/lib.rs b/modderbaas/src/lib.rs
index f9b1c8b..f65e96c 100644
--- a/modderbaas/src/lib.rs
+++ b/modderbaas/src/lib.rs
@@ -84,9 +84,10 @@ use error::Result;
///
/// This function is useful to iterate through the items in a directory and find fitting objects:
///
-/// ```rust
-/// use modderbaas::minemod::MineMod;
-/// let mods = scan("/tmp", |p| MineMod::open(p))?;
+/// ```no_run
+/// use modderbaas::{scan, minemod::MineMod};
+/// let mods: Vec<MineMod> = scan("/tmp", |p| MineMod::open(p))?;
+/// # Ok::<(), Box<dyn std::error::Error>>(())
/// ```
pub fn scan<W, P: AsRef<Path>, F: for<'p> Fn(&'p Path) -> Result<W>>(
path: P,