mirror of
https://github.com/SkyfallWasTaken/dinopkg.git
synced 2024-11-25 13:53:41 +00:00
Placate Clippy
This commit is contained in:
parent
9b7fbcfc06
commit
6164542183
2 changed files with 2 additions and 5 deletions
|
@ -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/"));
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue