fix warnings
auto merge of #6546 : cmr/rust/warning, r=thestinger