[PR #468] [MERGED] [fix] the suspicious use of OpenOptions::create() without an explicit OpenOptions::truncate(). #475

Closed
opened 2026-02-27 20:24:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/468
Author: @ramsayleung
Created: 3/24/2024
Status: Merged
Merged: 3/24/2024
Merged by: @ramsayleung

Base: masterHead: ramsay/fix-suspicious_open_options


📝 Commits (2)

  • 6b4e70a [fix]Fix the suspicious use of OpenOptions::create() without an explicit OpenOptions::truncate().
  • cb1965c cargo fmt the codebase to respect the code taste.

📊 Changes

1 file changed (+5 additions, -1 deletions)

View changed files

📝 rspotify-model/src/auth.rs (+5 -1)

📄 Description

Description

Rust 1.77 introduces a new cargo clippy lint rule for the suspicious use of OpenOptions::create() without an explicit OpenOptions::truncate(), which failed the cargo clipy CI task

Motivation and Context

Dependencies

None

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

  • cargo clippy -p rspotify -p rspotify-http -p rspotify-model -p rspotify-macros --no-default-features --features=rspotify/cli,rspotify/env-file,rspotify/client-ureq,rspotify/ureq-rustls-tls,rspotify-http/client-ureq,rspotify-http/ureq-rustls-tls --all-targets -- -D warnings: passed
  • All CI tasks passed

Is this change properly documented?

It's unnecessary.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ramsayleung/rspotify/pull/468 **Author:** [@ramsayleung](https://github.com/ramsayleung) **Created:** 3/24/2024 **Status:** ✅ Merged **Merged:** 3/24/2024 **Merged by:** [@ramsayleung](https://github.com/ramsayleung) **Base:** `master` ← **Head:** `ramsay/fix-suspicious_open_options` --- ### 📝 Commits (2) - [`6b4e70a`](https://github.com/ramsayleung/rspotify/commit/6b4e70a32397ae541138a48bec88075493247ee6) [fix]Fix the suspicious use of OpenOptions::create() without an explicit OpenOptions::truncate(). - [`cb1965c`](https://github.com/ramsayleung/rspotify/commit/cb1965ceb5a63e1680e100fd88eb0d2dd835d47a) `cargo fmt` the codebase to respect the code taste. ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `rspotify-model/src/auth.rs` (+5 -1) </details> ### 📄 Description ## Description Rust 1.77 introduces a new cargo clippy lint rule for the suspicious use of `OpenOptions::create()` without an explicit `OpenOptions::truncate()`, which failed the `cargo clipy` CI task ## Motivation and Context - https://rust-lang.github.io/rust-clippy/master/index.html#/suspicious_open_options - https://github.com/ramsayleung/rspotify/actions/runs/8396555462/job/22998169454?pr=467 ## Dependencies None ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How has this been tested? - `cargo clippy -p rspotify -p rspotify-http -p rspotify-model -p rspotify-macros --no-default-features --features=rspotify/cli,rspotify/env-file,rspotify/client-ureq,rspotify/ureq-rustls-tls,rspotify-http/client-ureq,rspotify-http/ureq-rustls-tls --all-targets -- -D warnings`: passed - All CI tasks passed ## Is this change properly documented? It's unnecessary. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rspotify#475
No description provided.