Skip to content

Commit 9abe831

Browse files
committed
MSRV fixes
1 parent 1da9bd7 commit 9abe831

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Diff for: .github/workflows/ci.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,9 @@ jobs:
5959
- build: win32-gnu
6060
os: windows-2019
6161
rust: stable-i686-gnu
62-
# TODO: re-enable this I guess. I get inscrutable errors like
63-
# `error reading from the zlib stream; class=Zlib (5)` in CI
64-
# that don't repro locally, and I'm tired of getting an email
65-
# about this every day.
66-
#
67-
# - build: msrv
68-
# os: ubuntu-latest
69-
# rust: "1.43.0"
62+
- build: msrv
63+
os: ubuntu-latest
64+
rust: "1.57.0"
7065
- build: beta
7166
os: ubuntu-latest
7267
rust: beta

Diff for: Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "arcstr"
33
version = "1.1.5"
4+
rust-version = "1.57.0"
45
authors = ["Thom Chiovoloni <[email protected]>"]
56
edition = "2021"
67
description = "A better reference-counted string type, with zero-cost (allocation-free) support for string literals, and reference counted substrings."

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![codecov](https://codecov.io/gh/thomcc/arcstr/branch/main/graph/badge.svg)](https://codecov.io/gh/thomcc/arcstr)
55
[![Docs](https://docs.rs/arcstr/badge.svg)](https://docs.rs/arcstr)
66
[![Latest Version](https://img.shields.io/crates/v/arcstr.svg)](https://crates.io/crates/arcstr)
7-
![Minimum Rust Version](https://img.shields.io/badge/MSRV%201.43-blue.svg)
7+
![Minimum Rust Version](https://img.shields.io/badge/MSRV%201.57-blue.svg)
88

99
This crate defines `ArcStr`, a reference counted string type. It's essentially trying to be a better `Arc<str>` or `Arc<String>`, at least for most use cases.
1010

Diff for: src/arc_str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ impl ArcStr {
392392
/// `Self::has_static_lenflag`)
393393
#[inline]
394394
unsafe fn load_count_flag_raw(this: &Self, ord_if_needed: Ordering) -> PackedFlagUint {
395-
PackedFlagUint::from_encoded(unsafe { (*this.0.as_ptr()).count_flag.load(ord_if_needed) })
395+
PackedFlagUint::from_encoded((*this.0.as_ptr()).count_flag.load(ord_if_needed))
396396
}
397397

398398
#[inline]
@@ -447,7 +447,7 @@ impl ArcStr {
447447

448448
#[inline]
449449
unsafe fn to_static_unchecked(this: &Self) -> &'static str {
450-
unsafe { &*Self::str_ptr(this) }
450+
&*Self::str_ptr(this)
451451
}
452452

453453
#[inline]

Diff for: src/mac.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ macro_rules! literal {
4242
count_flag: $crate::_private::StaticArcStrInner::<[$crate::_private::u8; __TEXT.len()]>::STATIC_COUNT_VALUE,
4343
// See comment for `_private::ConstPtrDeref` for what the hell's
4444
// going on here.
45-
data: __TEXT.as_ptr().cast::<[$crate::_private::u8; __TEXT.len()]>().read(),
45+
data: *$crate::_private::ConstPtrDeref::<[$crate::_private::u8; __TEXT.len()]> {
46+
p: __TEXT.as_ptr(),
47+
}
48+
.a,
49+
// data: __TEXT.as_ptr().cast::<[$crate::_private::u8; __TEXT.len()]>().read(),
4650
}
4751
};
4852
#[allow(clippy::declare_interior_mutable_const)]

0 commit comments

Comments
 (0)