diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bb3a502..63b0e74 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -53,7 +53,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Test lib & docs + - name: Test run: | - cargo test --lib --all-features - cargo test --doc --all-features + cargo test --all-features --no-fail-fast diff --git a/src/config.rs b/src/config.rs index ab10a0a..3e80c21 100644 --- a/src/config.rs +++ b/src/config.rs @@ -187,6 +187,8 @@ pub async fn save(config_content: Config, path: PathBuf) -> error::Result<()> { let mut file = fs::File::create(path).await?; let content = format!("{}\n", toml::to_string(&config_content)?); file.write_all(content.as_bytes()).await?; + file.shutdown().await?; + Ok(()) } diff --git a/src/main.rs b/src/main.rs index 928a125..b918bb0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,7 +57,7 @@ async fn compare(core: Core) -> error::Result<()> { "*".white().on_black(), new_pkg.0.blue(), old_pkg.1.version.red(), - new_pkg.1.version.blue() + new_pkg.1.version.green() ); } } else { diff --git a/src/verfiles.rs b/src/verfiles.rs index dd40fae..589c589 100644 --- a/src/verfiles.rs +++ b/src/verfiles.rs @@ -76,6 +76,8 @@ pub async fn save( let content = format!("{}\n", serde_json::to_string_pretty(&verfile)?); file.write_all(content.as_bytes()).await?; + file.shutdown().await?; + Ok(()) } @@ -83,6 +85,7 @@ async fn load_file(path: &Path) -> error::Result { if !path.exists() { let mut file = fs::File::create(path).await?; file.write_all(TEMPLATE.as_bytes()).await?; + file.shutdown().await?; } let content = fs::read_to_string(path).await?;