chore: run rustfmt
This commit is contained in:
parent
d8642beb59
commit
72d2c32d08
1 changed files with 9 additions and 6 deletions
15
src/main.rs
15
src/main.rs
|
@ -1,13 +1,12 @@
|
|||
use clap::{Parser, Subcommand};
|
||||
// use time::OffsetDateTime;
|
||||
use ctrlc;
|
||||
use forgejo_api::Auth::Token;
|
||||
use forgejo_api::Forgejo;
|
||||
use forgejo_api::structs::CreateReleaseOption;
|
||||
use std::io;
|
||||
use url::Url;
|
||||
use ctrlc;
|
||||
use std::sync::mpsc::channel;
|
||||
|
||||
use url::Url;
|
||||
|
||||
pub mod config;
|
||||
|
||||
|
@ -158,10 +157,14 @@ async fn handle_list_releases(config: &config::Config, alias: &str) -> Result<()
|
|||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let (tx_ctrlc, _rx_ctrlc) = channel();
|
||||
let (tx_ctrlc, _rx_ctrlc) = channel();
|
||||
|
||||
ctrlc::set_handler(move || tx_ctrlc.send(()).expect("Could not send signal on channel."))
|
||||
.expect("Error setting Ctrl-C handler");
|
||||
ctrlc::set_handler(move || {
|
||||
tx_ctrlc
|
||||
.send(())
|
||||
.expect("Could not send signal on channel.")
|
||||
})
|
||||
.expect("Error setting Ctrl-C handler");
|
||||
|
||||
let args = Cli::parse();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue