diff options
author | Cyborus <cyborus@noreply.codeberg.org> | 2023-12-13 02:06:00 +0100 |
---|---|---|
committer | Cyborus <cyborus@noreply.codeberg.org> | 2023-12-13 02:06:00 +0100 |
commit | 98e3cceff8170faf0b1f3a8e24b84d84714876d7 (patch) | |
tree | 92db800978e190cd63334945d2f44215cb5f49c0 /src/main.rs | |
parent | Merge pull request 'add basic issue commands' (#7) from issues into main (diff) | |
parent | format (diff) | |
download | forgejo-cli-98e3cceff8170faf0b1f3a8e24b84d84714876d7.tar.xz forgejo-cli-98e3cceff8170faf0b1f3a8e24b84d84714876d7.zip |
Merge pull request 'add ci' (#8) from ci into main
Reviewed-on: https://codeberg.org/Cyborus/forgejo-cli/pulls/8
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 856f958..c7674d0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,7 +67,7 @@ async fn readline(msg: &str) -> eyre::Result<String> { async fn editor(contents: &mut String, ext: Option<&str>) -> eyre::Result<()> { let editor = 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?; drop(file); @@ -88,7 +88,8 @@ async fn editor(contents: &mut String, ext: Option<&str>) -> eyre::Result<()> { eprint!(" \r"); Ok(()) - })().await; + })() + .await; tokio::fs::remove_file(path).await?; res?; |