Skip to content

Commit 485ab6a

Browse files
authored
Align minimum rust version to 1.86 (#47)
* Align minimum rust version to 1.86 An issue was mentioned in heroku/buildpacks-deb-packages#110 (comment). This code was added in https://github.com/heroku-buildpacks/bullet_stream/pull/43/files and uses a feature of Rust 1.86 https://www.reddit.com/r/rust/comments/1ip51qt/trait_upcasting_stabilized_in_186/ (rust-lang/rust#134367). This usage wasn't realized at the time. No lints or tooling caught it. That Any upcast is critical for the feature introduced in #43. The easiest path forward is to align the MSRV with the reality of the current code. Semver version bump guidance from this thread to make this a minor change: https://users.rust-lang.org/t/rust-version-requirement-change-as-semver-breaking-or-not/20980/2. * Fix clippy lint ``` error: variables can be used directly in the `format!` string --> src/global.rs:678:9 | 678 | assert!(result.is_err(), "Expected panic to be caught {:?}", result); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args = note: `-D clippy::uninlined-format-args` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]` help: change this to | 678 - assert!(result.is_err(), "Expected panic to be caught {:?}", result); 678 + assert!(result.is_err(), "Expected panic to be caught {result:?}"); | error: could not compile `bullet_stream` (lib test) due to 1 previous error ```
1 parent d76075d commit 485ab6a

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
## Unreleased
44

5+
## v0.11.0 2025/07/01
6+
7+
- Change/fix: Minimum supported Rust version is now officially 1.86. Previously released, v0.10.0, used a feature stabalized in 1.86 but did not correctly update the MSRV (https://github.com/heroku-buildpacks/bullet_stream/pull/47).
8+
59
## v0.10.0 2025/06/09
610

11+
- Change: Uses a feature of Rust not supported until 1.86, although the MSRV was not correctly incremented in this release (https://github.com/heroku-buildpacks/bullet_stream/pull/43).
712
- Add: New function `global::with_locked_writer` is introduced to allow consistently capturing write output. This function is designed for use in testing output or in other non-reentrant capture cases. This blocks all threads using this function but one from executing so that a deterministic and consistent output is captured. Previously tests could be written with a thread_local writer, however there's a subtle race condition in that approach if the output relies on "paragraph" style text (https://github.com/heroku-buildpacks/bullet_stream/pull/43).
813

914
## v0.9.0 2025/06/05

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bullet_stream"
3-
version = "0.10.0"
3+
version = "0.11.0"
44
edition = "2021"
55
license = "MIT"
66
description = "Bulletproof printing for bullet point text"
@@ -9,6 +9,7 @@ repository = "https://github.com/schneems/bullet_stream"
99
documentation = "https://docs.rs/bullet_stream"
1010
readme = "README.md"
1111
include = ["src/**/*", "LICENSE", "README.md"]
12+
rust-version = "1.86"
1213

1314
[dependencies]
1415
fun_run = { version = ">=0.5,<1", optional = true }

src/global.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ mod test {
675675
.join()
676676
.expect("First thread should complete successfully");
677677

678-
assert!(result.is_err(), "Expected panic to be caught {:?}", result);
678+
assert!(result.is_err(), "Expected panic to be caught {result:?}");
679679

680680
let handle2 = thread::spawn(|| {
681681
let output = with_locked_writer(Vec::new(), || {

0 commit comments

Comments
 (0)