set_path: Pass in the function directly

imgbot
Blaž Hrastnik 3 years ago
parent 3e69a4852e
commit c1e5831b21

@ -555,7 +555,7 @@ impl Document {
pub fn set_path(&mut self, path: Option<&Path>) -> Result<(), std::io::Error> { pub fn set_path(&mut self, path: Option<&Path>) -> Result<(), std::io::Error> {
let path = path let path = path
.map(|path| helix_core::path::get_canonicalized_path(path)) .map(helix_core::path::get_canonicalized_path)
.transpose()?; .transpose()?;
// if parent doesn't exist we still want to open the document // if parent doesn't exist we still want to open the document

Loading…
Cancel
Save