summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2023-12-13 06:30:47 +0100
committerCyborus <cyborus@cyborus.xyz>2023-12-13 06:30:47 +0100
commit33367ed9c6383d2e11845f57be3df49221287db7 (patch)
tree38c7187c90cfafa0c4132974bf4ea9c66d12dd2a /src
parentadd system for editor-specific flags (diff)
downloadforgejo-cli-33367ed9c6383d2e11845f57be3df49221287db7.tar.xz
forgejo-cli-33367ed9c6383d2e11845f57be3df49221287db7.zip
fmt
Diffstat (limited to 'src')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 414a161..ca6b624 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -70,7 +70,9 @@ async fn readline(msg: &str) -> eyre::Result<String> {
}
async fn editor(contents: &mut String, ext: Option<&str>) -> eyre::Result<()> {
- let editor = std::path::PathBuf::from(std::env::var_os("EDITOR").ok_or_else(|| eyre!("unable to locate editor"))?);
+ let editor = std::path::PathBuf::from(
+ std::env::var_os("EDITOR").ok_or_else(|| eyre!("unable to locate editor"))?,
+ );
let (mut file, path) = tempfile(ext).await?;
file.write_all(contents.as_bytes()).await?;