Make graphene_core no_std

This commit is contained in:
Dennis 2022-04-22 15:15:39 +02:00 committed by Keavon Chambers
parent 90e465b35c
commit 09deee0c4d
12 changed files with 94 additions and 56 deletions

View file

@ -0,0 +1,8 @@
[package]
name = "borrow_stack"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View file

@ -0,0 +1,20 @@
trait BorrowStack {
type Item;
unsafe fn push(&mut self, T) -> &Item;
unsafe fn pop(&mut self) -> T;
unsafe fn get(&self) -> &T;
}
struct BorrowStack<S> {
data: S,
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}