Function type vs Closure type
问题 I want to create a vector of functions let all_rerankers = vec![ match_full , match_partial , match_regex , match_camel_case ]; However, match_camel_case needs one more parameter than other functions, so I though I could define a closure for match_camel_case // 3 is the extra parameter needed by match_camel_case let close_camel_case = |str: &str, keyword: &str| { match_camel_case(str, keyword, 3) }; and then specify the type of my vector: let all_rerankers: Vec<|str: &str, kwd: &str| ->