From 64ca07910df09d614a24d15a54c9cc3a4385799b Mon Sep 17 00:00:00 2001 From: David Knaack Date: Wed, 29 Nov 2023 07:27:47 +0100 Subject: [PATCH] chore: fix rust 1.74 clippy lints (#5578) --- src/modules/c.rs | 2 +- src/modules/pulumi.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/c.rs b/src/modules/c.rs index b8aa3b0e..3e520f4d 100644 --- a/src/modules/c.rs +++ b/src/modules/c.rs @@ -47,7 +47,7 @@ pub fn module<'a>(context: &'a Context) -> Option> { } else { return None; }; - Some(c_compiler).map(Cow::Borrowed).map(Ok) + Some(Ok(Cow::Borrowed(c_compiler))) } "version" => { let c_compiler_info = &c_compiler_info.deref().as_ref()?.stdout; diff --git a/src/modules/pulumi.rs b/src/modules/pulumi.rs index 09301449..6df36dde 100644 --- a/src/modules/pulumi.rs +++ b/src/modules/pulumi.rs @@ -285,8 +285,9 @@ mod tests { let project_file = PathBuf::from("/hello/Pulumi.yaml"); assert_eq!( get_pulumi_workspace(&context, name, &project_file), - Some("/home/sweet/home/.pulumi/workspaces/foobar-test-workspace.json") - .map(PathBuf::from) + Some(PathBuf::from( + "/home/sweet/home/.pulumi/workspaces/foobar-test-workspace.json" + )) ); }