mirror of
https://github.com/Noratrieb/the-good-stuff.git
synced 2026-01-16 01:25:01 +01:00
move
This commit is contained in:
parent
1721d6a45a
commit
9bab547bcf
20 changed files with 1305 additions and 0 deletions
14
old-stuff/examples/scratch.rs
Normal file
14
old-stuff/examples/scratch.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use uwu::scratch::{
|
||||
actual_scratch_read, actual_scratch_write, define_scratch, scratch_space, Scratch,
|
||||
};
|
||||
|
||||
#[scratch_space]
|
||||
fn has_scratch_space(mut scratch: Scratch<'_>) {
|
||||
scratch_write!(scratch, 10u32);
|
||||
let _: u32 = scratch_read!(scratch);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
define_scratch!(scratch, 10);
|
||||
has_scratch_space(scratch);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue