Skip to content

Commit

Permalink
Follow tantivy changes, replacing as_text with as_str
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Oct 30, 2024
1 parent e2a66ea commit 86247f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wiki.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ impl Wiki {
Ok(top_docs
.iter()
.filter_map(|(score, doc_address)| {
let doc = match searcher.doc(*doc_address) {
let doc = match searcher.doc::<TantivyDocument>(*doc_address) {
Ok(doc) => doc,
Err(_) => return None,
};
Expand All @@ -317,13 +317,13 @@ impl Wiki {
let title = doc
.get_first(fields.title)
.unwrap()
.as_text()
.as_str()
.unwrap()
.to_owned();
let path = doc
.get_first(fields.path)
.unwrap()
.as_text()
.as_str()
.unwrap()
.to_owned();
let snippet_html = highlight(snippet);
Expand Down

0 comments on commit 86247f8

Please sign in to comment.