Skip to content

Commit

Permalink
Merge pull request #1 from bluss/fix-captures
Browse files Browse the repository at this point in the history
Fix phf::Map::get call
  • Loading branch information
mozillazg committed Nov 21, 2015
2 parents b9f26de + cd26812 commit 5ce8445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ fn to_fixed<'a>(p: String, a: &'a Args) -> String {
// 替换拼音中的带声调字符
let py = re_phonetic_symbol.replace_all(&p, |caps: &Captures| {
let cap = caps.at(0).unwrap();
let symbol = match PHONETIC_SYMBOL_MAP.get(&cap) {
let symbol = match PHONETIC_SYMBOL_MAP.get(cap) {
Some(&v) => v,
None => "",
};
Expand Down

0 comments on commit 5ce8445

Please sign in to comment.