Search example: panic when missing the index path

This commit is contained in:
Louis Dureuil 2023-03-27 18:18:01 +02:00
parent af65fe201a
commit 626a93b348
No known key found for this signature in database

View File

@ -14,7 +14,7 @@ fn main() -> Result<(), Box<dyn Error>> {
let mut args = std::env::args();
let program_name = args.next().expect("No program name");
let dataset = args.next().unwrap_or_else(|| {
format!(
panic!(
"Missing path to index. Usage: {} <PATH-TO-INDEX> [<logger-dir>] [print-documents]",
program_name
)