From d6d56161494a8b7fd5f6dfaa99d3c521d10f3806 Mon Sep 17 00:00:00 2001 From: morde Date: Wed, 11 Sep 2024 10:50:05 +0300 Subject: [PATCH] bruh --- .github/workflows/ci.yml | 2 +- src/handlers/use_handler.rs | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41a53f3..6d67c14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: } - { NAME: macos, - OS: macos-latest-large, + OS: macos-13, ARCH: x86_64, PATH: target/optimized/bob, } diff --git a/src/handlers/use_handler.rs b/src/handlers/use_handler.rs index f16e389..7908ea9 100644 --- a/src/handlers/use_handler.rs +++ b/src/handlers/use_handler.rs @@ -262,17 +262,13 @@ async fn copy_nvim_proxy(config: &Config) -> Result<()> { async fn copy_file_with_error_handling(old_path: &Path, new_path: &Path) -> Result<()> { match fs::copy(&old_path, &new_path).await { Ok(_) => Ok(()), - Err(e) => { - match e.raw_os_error() { - Some(26) | Some(32) => { - Err(anyhow::anyhow!( - "The file {} is busy. Please make sure to close any processes using it.", - old_path.display() - )) - } - _ => Err(anyhow::anyhow!(e).context("Failed to copy file")), - } - } + Err(e) => match e.raw_os_error() { + Some(26) | Some(32) => Err(anyhow::anyhow!( + "The file {} is busy. Please make sure to close any processes using it.", + old_path.display() + )), + _ => Err(anyhow::anyhow!(e).context("Failed to copy file")), + }, } }