mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Make graphene_core no_std
This commit is contained in:
parent
90e465b35c
commit
09deee0c4d
12 changed files with 94 additions and 56 deletions
8
node-graph/borrow_stack/Cargo.toml
Normal file
8
node-graph/borrow_stack/Cargo.toml
Normal 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]
|
20
node-graph/borrow_stack/src/lib.rs
Normal file
20
node-graph/borrow_stack/src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue