diff --git a/.github/markdown-link-check.json b/.github/markdown-link-check.json index 3f3487d94..d4420db7b 100644 --- a/.github/markdown-link-check.json +++ b/.github/markdown-link-check.json @@ -5,6 +5,9 @@ }, { "pattern": "^https://twitter.com/artichokeruby" + }, + { + "pattern": "^https://www.reddit.com/r/rust/" } ], "replacementPatterns": [], diff --git a/Cargo.toml b/Cargo.toml index 8517f9c66..f7914e7d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "cactusref" -version = "0.4.0" # remember to set `html_root_url` in `src/lib.rs`. +version = "0.5.0" # remember to set `html_root_url` in `src/lib.rs`. authors = ["Ryan Lopopolo "] license = "MIT" edition = "2021" -rust-version = "1.56.0" +rust-version = "1.77.0" readme = "README.md" repository = "https://github.com/artichoke/cactusref" documentation = "https://docs.rs/cactusref" diff --git a/README.md b/README.md index cbdc4f044..049c4c818 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -cactusref = "0.4.0" +cactusref = "0.5.0" ``` CactusRef is mostly a drop-in replacement for `std::rc::Rc`, which can be used diff --git a/src/lib.rs b/src/lib.rs index 6821ed9d2..4000f7454 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,12 +7,14 @@ slice_ptr_get )] #![allow(incomplete_features)] +#![allow(internal_features)] #![warn(clippy::all)] #![warn(clippy::pedantic)] #![warn(clippy::cargo)] #![allow(clippy::cast_possible_wrap)] #![allow(clippy::inline_always)] #![allow(clippy::let_underscore_untyped)] +#![allow(clippy::manual_let_else)] #![allow(clippy::missing_panics_doc)] #![allow(clippy::option_if_let_else)] #![allow(clippy::needless_pass_by_ref_mut)] @@ -126,7 +128,7 @@ //! [`CoerceUnsized`]: core::ops::CoerceUnsized //! [`DispatchFromDyn`]: core::ops::DispatchFromDyn -#![doc(html_root_url = "https://docs.rs/cactusref/0.4.0")] +#![doc(html_root_url = "https://docs.rs/cactusref/0.5.0")] #![no_std] // Ensure code blocks in README.md compile diff --git a/src/rc.rs b/src/rc.rs index 6ed6de0ee..54ce4b26f 100644 --- a/src/rc.rs +++ b/src/rc.rs @@ -261,6 +261,7 @@ use crate::link::Links; #[cfg(test)] #[allow(clippy::redundant_clone)] +#[allow(clippy::uninlined_format_args)] mod tests; // This is repr(C) to future-proof against possible field-reordering, which @@ -1005,7 +1006,7 @@ impl Rc { // Copy value as bytes ptr::copy_nonoverlapping( - (box_ptr as *const T).cast::(), + box_ptr.cast_const().cast::(), ptr::addr_of_mut!((*ptr).value).cast::(), value_size, ); @@ -1507,7 +1508,7 @@ impl Weak { pub unsafe fn from_raw(ptr: *const T) -> Self { // See Weak::as_ptr for context on how the input pointer is derived. - let ptr = if is_dangling(ptr as *mut T) { + let ptr = if is_dangling(ptr.cast_mut()) { // This is a dangling Weak. ptr as *mut RcBox } else {