(&self, client: &Client)
| 149 | |
| 150 | impl FetchTopicLiveSearch { |
| 151 | pub fn call(&self, client: &Client) -> Result<FetchTopicLiveSearchResult> { |
| 152 | if self.search.tokens.is_empty() { |
| 153 | log::info!("empty search, returning no results"); |
| 154 | return Ok(FetchTopicLiveSearchResult { |
| 155 | synonyms: BTreeSet::new(), |
| 156 | }); |
| 157 | } |
| 158 | |
| 159 | log::info!("searching for topics: {:?}", self.search); |
| 160 | let matches = self.fetch(client); |
| 161 | |
| 162 | Ok(FetchTopicLiveSearchResult { |
| 163 | synonyms: matches.iter().take(self.limit).cloned().collect(), |
| 164 | }) |
| 165 | } |
| 166 | |
| 167 | fn fetch(&self, client: &Client) -> BTreeSet<SynonymEntry> { |
| 168 | let mut matches = BTreeSet::new(); |
nothing calls this directly
no test coverage detected