Debian Codegraph @

debian/missing-sources/lazy_static/tests/no_std.rs

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