Fix #6342
auto merge of #6672 : yjh0502/rust/fix_6342, r=graydon

Fix #6342