set_path: Pass in the function directly
commitc1e5831b2186a12ab593df1dc1dc698875484dc6
authorBlaž Hrastnik <blaz@mxxn.io>
dateThu 28 Oct 2021, 10:51 (5 years ago)
parent3e69a48
helix-view/src/document.rs+1−1
@@ -555,7 +555,7 @@ impl Document {
555555
556556 pub fn set_path(&mut self, path: Option<&Path>) -> Result<(), std::io::Error> {
557557 let path = path
558− .map(|path| helix_core::path::get_canonicalized_path(path))
558+ .map(helix_core::path::get_canonicalized_path)
559559 .transpose()?;
560560
561561 // if parent doesn't exist we still want to open the document