Placate Clippy

This commit is contained in:
SkyfallWasTaken 2024-07-15 18:26:53 +01:00
parent 9b7fbcfc06
commit 6164542183
2 changed files with 2 additions and 5 deletions

View file

@ -11,9 +11,7 @@ pub async fn init() -> Result<()> {
let current_dir_name = current_dir.file_name().unwrap_or("package");
// FIXME: this blocks the event loop
let git_config_file = GitConfigFile::from_git_dir(current_dir.join(".git").into());
let git_repo_url = git_config_file
.and_then(|config| {
Ok(config
let git_repo_url = git_config_file.map(|config| config
.section("remote", Some("origin".into()))
.ok()
.and_then(|remote_section| {
@ -22,7 +20,6 @@ pub async fn init() -> Result<()> {
.value("url")
.map(|url| url.to_string())
}))
})
.ok()
.flatten()
.map(|url| url.replace("git@github.com", "https://github.com/"));

View file

@ -18,7 +18,7 @@ pub async fn run(script_name: Option<String>) -> Result<()> {
println!("{} {}", "$".purple().dimmed(), script.bold().dimmed());
let status =
run_script(DEFAULT_SHELL, DEFAULT_SHELL_EXEC_ARG, &script, root_path)
run_script(DEFAULT_SHELL, DEFAULT_SHELL_EXEC_ARG, script, root_path)
.await?;
if cfg!(unix) {