perf: remove needless change copy when importing

This commit is contained in:
Zixuan Chen 2022-11-16 13:50:42 +08:00
parent ff9877db42
commit f6adb76436

View file

@ -376,8 +376,8 @@ impl ContainerWrapper for Text {
F: FnOnce(&mut Self::Container) -> R,
{
let mut container_instance = self.instance.lock().unwrap();
let map = container_instance.as_text_mut().unwrap();
f(map)
let text = container_instance.as_text_mut().unwrap();
f(text)
}
}