diff options
Diffstat (limited to 'indexer/src/indexer_implementation.rs')
-rw-r--r-- | indexer/src/indexer_implementation.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indexer/src/indexer_implementation.rs b/indexer/src/indexer_implementation.rs index 4bb3857..d5cfead 100644 --- a/indexer/src/indexer_implementation.rs +++ b/indexer/src/indexer_implementation.rs @@ -30,8 +30,8 @@ impl crate::Indexer for IndexerImplementation { &mut self, word: &str, url: &str, - title: &str, - description: &str, + title: Option<String>, + description: Option<String>, content: &str, fixed_words: &[String], ) -> Result<(), String> { @@ -39,8 +39,8 @@ impl crate::Indexer for IndexerImplementation { url: url.to_string(), priority: Self::calculate_word_priority(word, content, fixed_words), word: Arc::new(word.to_string()), - title: title.to_string(), - description: description.to_string(), + title: title.map(String::from), + description: description.map(String::from), }; match self.database.get_mut(word) { |