Skip to content

Commit

Permalink
tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
noib3 committed Dec 2, 2023
1 parent 564d81c commit 446902b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//! # Examples
//!
//! ```rust
//! # use core::ops::Range;
//! use norm::fzf::{FzfParser, FzfV2};
//! use norm::Metric;
//!
Expand All @@ -39,8 +40,8 @@
//! .filter_map(|city| fzf.distance(query, city).map(|dist| (city, dist)))
//! .collect::<Vec<_>>();
//!
//! // We sort the results by distance in ascending order, so that the best match
//! // will be at the front of the vector.
//! // We sort the results by distance in ascending order, so that the best
//! // match will be at the front of the vector.
//! results.sort_by_key(|(_city, dist)| *dist);
//!
//! assert_eq!(results.len(), 2);
Expand All @@ -50,7 +51,7 @@
//! // We can also find out which sub-strings of each candidate matched the
//! // query.
//!
//! let mut ranges = Vec::new();
//! let mut ranges: Vec<Range<usize>> = Vec::new();
//!
//! let _ = fzf.distance_and_ranges(query, results[0].0, &mut ranges);
//! assert_eq!(ranges.len(), 2);
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/fzf/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Metrics implementing fzf's fuzzy search algorithm.
//! Metrics implementing fzf's algorithms.
//!
//! This module contains two metrics -- [`FzfV1`] and [`FzfV2`] -- which were
//! ported from [fzf], a popular command-line fuzzy-finder.
Expand Down

0 comments on commit 446902b

Please sign in to comment.