删除mut_iter后,在夜间构建中创建可变迭代器

Syn*_*ose 2 rust

我下载了Rust的每晚版本并尝试构建我的代码,但有趣的是我意识到mut_iter()不再存在.删除为字符串创建可变迭代器的能力的原因是什么?我有这个功能:

//invert hex picture, this is used in the print_bitmap function
//  to save space and break apart one large code base.
pub fn invert_ascii_hex_string(line: &mut [std::ascii::Ascii]) {
  for c in line.mut_iter() {
    *c = match c.to_char() {
      'x' => ' ',
       _  => 'x'
    }.to_ascii();
  }
}
Run Code Online (Sandbox Code Playgroud)

现在我不确定如何在没有可变迭代器的情况下完成此任务.我现在可以使用什么来迭代列表并更改每个值?

Com*_*uid 6

尝试iter_mut()而不是mut_iter()