Skip to content

Commit 9c2f176

Browse files
committed
using equals matching
1 parent 5495848 commit 9c2f176

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sauce/home.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,23 +322,23 @@ pub fn home() -> Html {
322322
let library = &entry.library;
323323

324324
let element_match = match element_search {
325-
Some(ref term) => element.to_lowercase().contains(&term.to_lowercase()),
325+
Some(ref term) => element.to_lowercase() == term.to_lowercase(),
326326
None => true,
327327
};
328328
let nucleons_match = match nucleons_search {
329-
Some(ref term) => nucleons.to_string().contains(&*term),
329+
Some(ref term) => nucleons.to_string() == *term,
330330
None => true,
331331
};
332332
let reaction_match = match reaction_search {
333-
Some(ref term) => reaction.to_lowercase().contains(&term.to_lowercase()),
333+
Some(ref term) => reaction.to_lowercase() == term.to_lowercase(),
334334
None => true,
335335
};
336336
let mt_match = match mt_search {
337-
Some(ref term) => mt.to_string().contains(&*term),
337+
Some(ref term) => mt.to_string() == *term,
338338
None => true,
339339
};
340340
let library_match = match library_search {
341-
Some(ref term) => library.to_lowercase().contains(&term.to_lowercase()),
341+
Some(ref term) => library.to_lowercase() == term.to_lowercase(),
342342
None => true,
343343
};
344344

0 commit comments

Comments
 (0)