("Start read heading"); let level = source.take_while但在这一行:如果将borrow_mut更改为borrow,将产生错误:
error[E0507]: cannot move^^ move occurs because `*source` has type `So
我正在尝试将一个非常大的数据集(在ndarray中的内存为28 of )分配到theano共享变量中,使用borrow=True来避免内存的复制。Split into training and validation ( theano.shared(data_t[:-1000, :], borrow=True)
我可以毫无问题地调用.borrow(),但是如果我调用.borrow_mut(),那么生锈编译器就会说cannot borrow as mutable。我看不出问题所在,我的.borrow_mut()看起来很好吗?();
let refmut_norefcell = nooverhead_refcell.borrow_mut();use crate::norc_ref