Skip to content

Commit

Permalink
fix: Don't use is_null on const context
Browse files Browse the repository at this point in the history
  • Loading branch information
GrayJack committed Nov 27, 2024
1 parent a31c536 commit 881b7e3
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/types/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ impl JanetBuffer<'_> {
/// own risk.
#[inline]
pub const unsafe fn from_raw(raw: *mut CJanetBuffer) -> Self {
debug_assert!(!raw.is_null());
Self {
raw,
phantom: PhantomData,
Expand Down
1 change: 0 additions & 1 deletion src/types/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ impl<'data> JanetString<'data> {
/// own risk.
#[inline]
pub const unsafe fn from_raw(raw: *const u8) -> Self {
debug_assert!(!raw.is_null());
Self {
raw,
phantom: PhantomData,
Expand Down
2 changes: 0 additions & 2 deletions src/types/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ impl JanetSymbol<'_> {
#[inline]
#[must_use]
pub const unsafe fn from_raw(raw: *const u8) -> Self {
debug_assert!(!raw.is_null());
Self {
raw,
phantom: PhantomData,
Expand Down Expand Up @@ -285,7 +284,6 @@ impl JanetKeyword<'_> {
#[inline]
#[must_use = "function is a constructor associated function"]
pub const unsafe fn from_raw(raw: *const u8) -> Self {
debug_assert!(!raw.is_null());
Self {
raw,
phantom: PhantomData,
Expand Down
2 changes: 0 additions & 2 deletions src/types/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ impl<'data> JanetTuple<'data> {
#[inline]
#[must_use = "function is a constructor associated function"]
pub const unsafe fn from_raw(raw: *const CJanet) -> Self {
debug_assert!(!raw.is_null());

Self {
raw,
phantom: PhantomData,
Expand Down

0 comments on commit 881b7e3

Please sign in to comment.