Skip to content

Commit

Permalink
Removed an unecessary feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ischeinkman committed Aug 21, 2024
1 parent a9c04d1 commit a5d883d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ license = "Zlib OR Apache-2.0 OR MIT"

[features]
default = ["on_gba"]
# SEE THE CRATE DOCS FOR SAFETY RELATED INFO REGARDING THIS FEATURE.
on_gba = []
# utilize `doc_cfg` where appropriate. requires nightly. intended mostly for use
# during docs.rs documentation generation.
doc_cfg = []
# Activates the `track_caller` attribute on various functions. Use of the
# `track_caller` attribute on a function adds a "secret" extra argument for the
# `Location` of the caller, which can reduce performance if the function is not
Expand Down
11 changes: 6 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
//! Provides the [`GbaCell`] type.
//!
//! ## Safety
//!
//! **This crate is intended to only be used for writing software on the
//! Nintendo Gameboy Advanced. Use on any other platform may lead to Undefined
//! Behaviour.**
use core::fmt::Debug;

Expand Down Expand Up @@ -28,7 +34,6 @@ unsafe impl<T> GbaCellSafe for T where T: Copy {}
#[repr(transparent)]
pub struct GbaCell<T>(core::cell::UnsafeCell<T>);

#[cfg(feature = "on_gba")]
impl<T> Debug for GbaCell<T>
where
T: GbaCellSafe + Debug,
Expand All @@ -48,7 +53,6 @@ where
Self::new(T::default())
}
}
#[cfg(feature = "on_gba")]
impl<T> Clone for GbaCell<T>
where
T: GbaCellSafe + Default,
Expand All @@ -60,7 +64,6 @@ where
}
}

#[cfg(feature = "on_gba")]
unsafe impl<T> Sync for GbaCell<T> {}

impl<T> GbaCell<T>
Expand Down Expand Up @@ -90,7 +93,6 @@ where
/// Read the value in the cell.
#[inline]
#[must_use]
#[cfg(feature = "on_gba")]
#[cfg_attr(feature = "track_caller", track_caller)]
pub fn read(&self) -> T {
// SAFETY: Guranteed to meet the size & alignment requirements of the
Expand All @@ -100,7 +102,6 @@ where

/// Writes a new value to the cell.
#[inline]
#[cfg(feature = "on_gba")]
#[cfg_attr(feature = "track_caller", track_caller)]
pub fn write(&self, t: T) {
// SAFETY: Guranteed to meet the size & alignment requirements of the
Expand Down

0 comments on commit a5d883d

Please sign in to comment.