Skip to content

Commit

Permalink
comment edit
Browse files Browse the repository at this point in the history
  • Loading branch information
tiftran committed Oct 4, 2023
1 parent 71e6642 commit b2adab2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions components/suggest/src/pocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,8 @@ impl ToSql for KeywordConfidence {
/// Return an empty string as the suffix if there is no whitespace.
///
/// # Examples:
///
/// ```
/// assert_eq!(split_keyword("foo"), ("foo", ""));
/// assert_eq!(split_keyword("foo bar baz"), ("foo", "bar baz"));
/// ```
pub fn split_keyword(keyword: &str) -> (&str, &str) {
keyword.split_once(' ').unwrap_or((keyword, ""))
}

0 comments on commit b2adab2

Please sign in to comment.