[PR #391] [CLOSED] Update to Rust Edition 2018 (and force rustfmt) #906

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

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/391
Author: @ashthespy
Created: 11/1/2019
Status: Closed

Base: devHead: edition_2018


📝 Commits (8)

  • 0b050a3 Use explicit dyn Trait
  • 678db7d Update to Rust 2018
  • 24e8a3c Replace try! shorthand
  • 592bd39 Complete migration to edition 2018
  • 0d68641 Run rustfmt on full codebase
  • 55865fc Add rustfmt to Travis
  • d9f18c9 Reset max_width
  • 854f779 Fix deprecated Error::cause warnings and missing dyn

📊 Changes

46 files changed (+382 additions, -271 deletions)

View changed files

📝 .travis.yml (+2 -0)
📝 Cargo.toml (+1 -0)
📝 audio/src/decrypt.rs (+5 -8)
📝 audio/src/fetch.rs (+15 -6)
📝 audio/src/lib.rs (+4 -4)
📝 audio/src/libvorbis_decoder.rs (+2 -2)
📝 connect/src/context.rs (+2 -2)
📝 connect/src/discovery.rs (+28 -27)
📝 connect/src/lib.rs (+2 -2)
📝 connect/src/spirc.rs (+34 -19)
📝 core/src/apresolve.rs (+10 -9)
📝 core/src/audio_key.rs (+7 -3)
📝 core/src/authentication.rs (+16 -15)
📝 core/src/cache.rs (+4 -4)
📝 core/src/channel.rs (+1 -1)
📝 core/src/config.rs (+1 -1)
📝 core/src/connection/codec.rs (+2 -1)
📝 core/src/connection/handshake.rs (+14 -12)
📝 core/src/connection/mod.rs (+28 -18)
📝 core/src/diffie_hellman.rs (+13 -8)

...and 26 more files

📄 Description

A lot of noise, but I guess its time to bit the bullet and move on.

Probably also a good time to review our rustfmt config - we set a max_width of 105 instead of the default 100. Not sure why?

PS: Also added a format check to Travis, might need a few iterations to get it to work.


🔄 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/librespot-org/librespot/pull/391 **Author:** [@ashthespy](https://github.com/ashthespy) **Created:** 11/1/2019 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `edition_2018` --- ### 📝 Commits (8) - [`0b050a3`](https://github.com/librespot-org/librespot/commit/0b050a3c3b612f971f58404bf549bcc68f4c5ac0) Use explicit `dyn Trait` - [`678db7d`](https://github.com/librespot-org/librespot/commit/678db7dca0130985d61b48368fdec0f38866be1a) Update to Rust 2018 - [`24e8a3c`](https://github.com/librespot-org/librespot/commit/24e8a3c19cb81c78668e23a7a70b73a4ad0c7bd1) Replace try! shorthand - [`592bd39`](https://github.com/librespot-org/librespot/commit/592bd39893c2e56201f35e69288a67bf8f7f3ee9) Complete migration to edition 2018 - [`0d68641`](https://github.com/librespot-org/librespot/commit/0d6864111eb95ff5f61e3c50426b8a3c81dd06da) Run rustfmt on full codebase - [`55865fc`](https://github.com/librespot-org/librespot/commit/55865fcecbda855c72d999b8798716164316c841) Add rustfmt to Travis - [`d9f18c9`](https://github.com/librespot-org/librespot/commit/d9f18c908e94b7323349baf8c2b060d097402f0f) Reset max_width - [`854f779`](https://github.com/librespot-org/librespot/commit/854f7798606d9b74466bc32c4603f3c146477908) Fix deprecated Error::cause warnings and missing dyn ### 📊 Changes **46 files changed** (+382 additions, -271 deletions) <details> <summary>View changed files</summary> 📝 `.travis.yml` (+2 -0) 📝 `Cargo.toml` (+1 -0) 📝 `audio/src/decrypt.rs` (+5 -8) 📝 `audio/src/fetch.rs` (+15 -6) 📝 `audio/src/lib.rs` (+4 -4) 📝 `audio/src/libvorbis_decoder.rs` (+2 -2) 📝 `connect/src/context.rs` (+2 -2) 📝 `connect/src/discovery.rs` (+28 -27) 📝 `connect/src/lib.rs` (+2 -2) 📝 `connect/src/spirc.rs` (+34 -19) 📝 `core/src/apresolve.rs` (+10 -9) 📝 `core/src/audio_key.rs` (+7 -3) 📝 `core/src/authentication.rs` (+16 -15) 📝 `core/src/cache.rs` (+4 -4) 📝 `core/src/channel.rs` (+1 -1) 📝 `core/src/config.rs` (+1 -1) 📝 `core/src/connection/codec.rs` (+2 -1) 📝 `core/src/connection/handshake.rs` (+14 -12) 📝 `core/src/connection/mod.rs` (+28 -18) 📝 `core/src/diffie_hellman.rs` (+13 -8) _...and 26 more files_ </details> ### 📄 Description A lot of noise, but I guess its time to bit the bullet and move on. Probably also a good time to review our `rustfmt` config - we set a `max_width` of 105 instead of the [default 100](https://github.com/rust-dev-tools/fmt-rfcs/blob/master/guide/guide.md#indentation-and-line-width). Not sure why? PS: Also added a format check to Travis, might need a few iterations to get it to work. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:24 +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/librespot#906
No description provided.