on master help sign in
set_path: Pass in the function directly
c1e5831Blaž Hrastnik
helix-view/src/document.rs+1−1
@@ -555,7 +555,7 @@ impl Document {
555
555
556 pub fn set_path(&mut self, path: Option<&Path>) -> Result<(), std::io::Error> {
556 pub fn set_path(&mut self, path: Option<&Path>) -> Result<(), std::io::Error> {
557 let path = path
557 let path = path
558− .map(|path| helix_core::path::get_canonicalized_path(path))
558+ .map(helix_core::path::get_canonicalized_path)
559 .transpose()?;
559 .transpose()?;
560
560
561 // if parent doesn't exist we still want to open the document
561 // if parent doesn't exist we still want to open the document