aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2021-11-09 21:17:10 +0100
committerDaniel Schadt <kingdread@gmx.de>2021-11-09 21:17:10 +0100
commit1535ad6e39fcdc38f6476a7d3fe29053231e08eb (patch)
treed8a15cd6a33f0f355f04cd671d7109e7e3f51f72
parent5dc8d0599701cacf13651bdf00149d82e1032c73 (diff)
downloadmodderbaas-1535ad6e39fcdc38f6476a7d3fe29053231e08eb.tar.gz
modderbaas-1535ad6e39fcdc38f6476a7d3fe29053231e08eb.tar.bz2
modderbaas-1535ad6e39fcdc38f6476a7d3fe29053231e08eb.zip
fix the doctest
-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,