From b6db233c73a2688767d711690ace7768baf817a5 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Fri, 30 Aug 2019 03:39:16 +1200 Subject: [PATCH] Start working on save --- src/commands/save.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/save.rs b/src/commands/save.rs index da5c093502..52e1e97ef0 100644 --- a/src/commands/save.rs +++ b/src/commands/save.rs @@ -89,7 +89,7 @@ fn save( } let content = if !save_raw { - to_string_for(full_path.extension(), &input) + to_string_for(full_path.extension(), &input).await } else { string_from(&input) }; @@ -114,7 +114,7 @@ fn save( let input: Vec> = input.values.collect().await; let content = if !save_raw { - to_string_for(full_path.extension(), &input) + to_string_for(full_path.extension(), &input).await } else { string_from(&input) }; @@ -153,7 +153,7 @@ fn string_from(input: &Vec>) -> Result { Ok(save_data) } -fn to_string_for( +async fn to_string_for( ext: Option<&std::ffi::OsStr>, input: &Vec>, ) -> Result {