pub fn find(&self, word: &String) -> bool {
        let found = self.basic_words.contains_key(word);
        if !found {
            return false
        }
        self.basic_words.get(word).unwrap().clone()
        // get() function to find the word inside the hashmap
        // unwrap() transforms form Option<&bool> to &bool
        // clone() takes the value from as the result, instead reference result
    }
// find lets you search a word from dictionary safely
find lets you search a word from dictionary safely
find lets you search a word from dictionary safely
pub fn find(&self, word: &String) -> bool {
        let found = self.basic_words.contains_key(word);
        if !found {
            return false
        }
        self.basic_words.get(word).unwrap().clone()
        // get() function to find the word inside the hashmap
        // unwrap() transforms form Option<&bool> to &bool
        // clone() takes the value from as the result, instead reference result
    }
pub fn find ( & self , word : & String ) -> bool { let found = self . basic_words . contains_key ( word ) ; if ! found { return false } self . basic_words . get ( word ) . unwrap ( ) . clone ( ) // get() function to find the word inside the hashmap // unwrap() transforms form Option<&bool> to &bool // clone() takes the value from as the result, instead reference result }
find lets you search a word from dictionary safely
find lets you search a word from dictionary safely
&self
word
&String
&self
word
&String