Skip to content

Commit

Permalink
Revert "fix: the error of the parameter pass type"
Browse files Browse the repository at this point in the history
fix: github action fialed.
This reverts commit c36338f.
  • Loading branch information
RocsSun committed Dec 28, 2023
1 parent bd81a41 commit f606b86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![feature(try_blocks)]
#![feature(if_let_guard)]
#![feature(let_chains)]
#![feature(type_name_of_val)]
#![feature(iterator_try_collect)]
#![feature(iterator_try_reduce)]
#![warn(clippy::all, clippy::nursery, clippy::cargo_common_metadata)]
Expand Down Expand Up @@ -169,13 +170,13 @@ async fn main() -> Result<()> {
}
_ if let Some(create_cmd) = parser::post::create_post(&args) => {
let CreateCmd { title, body, publish } = create_cmd;
let id = Post::new(pat?).create(title.as_str(), body.as_str(), *publish).await;
let id = Post::new(pat?).create(title, body, *publish).await;
foe.then(|| panic_if_err(&id));
display::create_post(style, &id)
}
_ if let Some((id, update_cmd)) = parser::post::update_post(&args) => {
let UpdateCmd { title, body, publish } = update_cmd;
let id = Post::new(pat?).update(id, &title, &body, &publish).await;
let id = Post::new(pat?).update(id, title, body, publish).await;
foe.then(|| panic_if_err(&id));
display::update_post(style, &id)
}
Expand Down

0 comments on commit f606b86

Please sign in to comment.