update tests for settings

This commit is contained in:
qdequele 2020-02-10 16:51:17 +01:00
parent 559c2f8907
commit 40d7396d90
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
3 changed files with 49 additions and 64 deletions

View file

@ -18,7 +18,7 @@ pub async fn get_all(ctx: Request<Data>) -> SResult<Response> {
let stop_words_fst = index.main.stop_words_fst(&reader)?;
let stop_words = stop_words_fst.unwrap_or_default().stream().into_strs()?;
let stop_words: BTreeSet<String> = stop_words.into_iter().collect();
let stop_words = if stop_words.is_empty() {
let stop_words = if !stop_words.is_empty() {
Some(stop_words)
} else {
None
@ -40,7 +40,7 @@ pub async fn get_all(ctx: Request<Data>) -> SResult<Response> {
}
}
let synonyms = if synonyms.is_empty() {
let synonyms = if !synonyms.is_empty() {
Some(synonyms)
} else {
None