Debian Codegraph @

.cargo/vendor/lazy_static/tests/no_std.rs

raw
1 #![cfg(feature="spin_no_std")]
2
3 #![no_std]
4
5 #[macro_use]
6 extern crate lazy_static;
7
8 lazy_static! {
9 /// Documentation!
10 pub static ref NUMBER: u32 = times_two(3);
11 }
12
13 fn times_two(n: u32) -> u32 {
14 n * 2
15 }
16
17 #[test]
18 fn test_basic() {
19 assert_eq!(*NUMBER, 6);
20 }