diff --git a/crates/bevy_ptr/Cargo.toml b/crates/bevy_ptr/Cargo.toml index 0b3d02daab8e5..6b1dc48525c30 100644 --- a/crates/bevy_ptr/Cargo.toml +++ b/crates/bevy_ptr/Cargo.toml @@ -6,6 +6,6 @@ description = "Utilities for working with untyped pointers in a more safe way" homepage = "https://bevyengine.org" repository = "https://github.com/bevyengine/bevy" license = "MIT OR Apache-2.0" -keywords = ["bevy"] +keywords = ["bevy", "no_std"] [dependencies] diff --git a/crates/bevy_ptr/src/lib.rs b/crates/bevy_ptr/src/lib.rs index d590d0bfb1552..075751a449a62 100644 --- a/crates/bevy_ptr/src/lib.rs +++ b/crates/bevy_ptr/src/lib.rs @@ -1,5 +1,8 @@ #![doc = include_str!("../README.md")] -use std::{cell::UnsafeCell, marker::PhantomData, mem::MaybeUninit, ptr::NonNull}; +#![no_std] +#![warn(missing_docs)] + +use core::{cell::UnsafeCell, marker::PhantomData, mem::MaybeUninit, ptr::NonNull}; /// Type-erased borrow of some unknown type chosen when constructing this type. /// @@ -239,7 +242,7 @@ impl<'a, T> From<&'a [T]> for ThinSlicePtr<'a, T> { } mod private { - use std::cell::UnsafeCell; + use core::cell::UnsafeCell; pub trait SealedUnsafeCell {} impl<'a, T> SealedUnsafeCell for &'a UnsafeCell {}