Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartHarris committed Mar 28, 2024
1 parent bb7dd65 commit 5f0d81a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crux_cli/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ pub async fn codegen(args: &CodegenArgs) -> Result<()> {
let target_directory = graph.workspace().target_directory().as_std_path();
let json_path = target_directory
.join("doc")
.join(format!("{}.json", lib.name().replace("-", "_")));
.join(format!("{}.json", lib.name().replace('-', "_")));

let rustdoc: Crate = spawn_blocking(move || {
let file = File::open(&json_path)?;
let file = File::open(json_path)?;
let crate_: Crate = serde_json::from_reader(file)?;
Ok::<rustdoc_types::Crate, anyhow::Error>(crate_)
})
Expand All @@ -53,7 +53,7 @@ pub async fn codegen(args: &CodegenArgs) -> Result<()> {
..
}) = &v.inner
{
(trait_name == &"App".to_string()).then(|| name)
(trait_name == &"App".to_string()).then_some(name)
} else {
None
}
Expand Down

0 comments on commit 5f0d81a

Please sign in to comment.