diff --git a/src/search_index/mod.rs b/src/search_index/mod.rs index 6ac509a..e5a08af 100644 --- a/src/search_index/mod.rs +++ b/src/search_index/mod.rs @@ -7,8 +7,9 @@ //! to generate a database you need a vector of paths of picture that you want to save and search in it. //! You also need a Vector of Feature generator functions that generates the feature of every image //! +//! //!``` -//! # use std::path::{PathBuf}; +//! # use std::path::{Path, PathBuf}; //! # use imsearch::image::Image; //! # use imsearch::search_index; //! use imsearch::search_index::FeatureGenerator; @@ -16,7 +17,8 @@ //! let path: Vec = Vec::new(); //! let features: Vec = Vec::new(); //! -//! let Database = search_index::Database::new(&path, features ); +//! let mut database = search_index::Database::new(&path, features ); +//! database.add_image(Path::new("testpath")); //! ``` //! //!