From 02c52ce57ec8e577be898670492c0e176925bb6f Mon Sep 17 00:00:00 2001 From: Wang Jie Date: Fri, 23 Apr 2021 21:50:41 +0800 Subject: [PATCH] fix: line wrap --- Cargo.lock | 2 +- Cargo.toml | 2 +- LICENSE | 2 +- src/command/pr.rs | 4 ++-- src/structs.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb31ce8..e03388c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1371,7 +1371,7 @@ dependencies = [ [[package]] name = "yag" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index cd756a3..4a21e5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yag" -version = "0.2.0" +version = "0.2.1" authors = ["Wang Jie "] edition = "2018" license = "MIT" diff --git a/LICENSE b/LICENSE index 71772a8..6910a7a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Wang Jie +Copyright (c) 2020-2021 Wang Jie Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/command/pr.rs b/src/command/pr.rs index b9b0a15..63a95df 100644 --- a/src/command/pr.rs +++ b/src/command/pr.rs @@ -143,7 +143,7 @@ impl<'a> Command<'a> { .await? .create_pull_request(&source_branch, &target_branch, &title) .await?; - print!("{:#}", pr); + println!("{:#}", pr); Ok(()) } @@ -155,7 +155,7 @@ impl<'a> Command<'a> { .unwrap(); let pr = get_repo().await?.close_pull_request(id).await?; - print!("{:#}", pr); + println!("{:#}", pr); Ok(()) } } diff --git a/src/structs.rs b/src/structs.rs index d2c2095..468bc28 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -19,7 +19,7 @@ impl PaginationResult { impl Display for PaginationResult { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { for item in self.result.iter() { - write!(f, "{}", item)?; + writeln!(f, "{}", item)?; } writeln!(f, " {} {}", "total:".purple(), self.total)?; Ok(())