mirror of
https://github.com/SkyfallWasTaken/dinopkg.git
synced 2024-11-10 07:39:39 +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");
|
let current_dir_name = current_dir.file_name().unwrap_or("package");
|
||||||
// FIXME: this blocks the event loop
|
// FIXME: this blocks the event loop
|
||||||
let git_config_file = GitConfigFile::from_git_dir(current_dir.join(".git").into());
|
let git_config_file = GitConfigFile::from_git_dir(current_dir.join(".git").into());
|
||||||
let git_repo_url = git_config_file
|
let git_repo_url = git_config_file.map(|config| config
|
||||||
.and_then(|config| {
|
|
||||||
Ok(config
|
|
||||||
.section("remote", Some("origin".into()))
|
.section("remote", Some("origin".into()))
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|remote_section| {
|
.and_then(|remote_section| {
|
||||||
|
@ -22,7 +20,6 @@ pub async fn init() -> Result<()> {
|
||||||
.value("url")
|
.value("url")
|
||||||
.map(|url| url.to_string())
|
.map(|url| url.to_string())
|
||||||
}))
|
}))
|
||||||
})
|
|
||||||
.ok()
|
.ok()
|
||||||
.flatten()
|
.flatten()
|
||||||
.map(|url| url.replace("git@github.com", "https://github.com/"));
|
.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());
|
println!("{} {}", "$".purple().dimmed(), script.bold().dimmed());
|
||||||
|
|
||||||
let status =
|
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?;
|
.await?;
|
||||||
|
|
||||||
if cfg!(unix) {
|
if cfg!(unix) {
|
||||||
|
|
Loading…
Reference in a new issue