Rust code hide Test

Add # at start of line to hiding with rust code block:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# use std::ffi::c_void;
#
# use sb7::application::Application;
# struct App;
#
# impl Application for App {
# fn startup(&mut self) {
# unsafe {
let mut buf = 0;
let mut data = Vec::from("hello world");
data.resize(1024 * 1024, 0);

gl::CreateBuffers(1, &mut buf);
{
let data = data.as_ptr() as *const c_void;
gl::NamedBufferStorage(buf, 1024 * 1024, data, gl::DYNAMIC_STORAGE_BIT);
}
# }
# }
# }
#
# fn main() {
# App.run()
# }

it will be render to:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# use std::ffi::c_void;
#
# use sb7::application::Application;
# struct App;
#
# impl Application for App {
# fn startup(&mut self) {
# unsafe {
let mut buf = 0;
let mut data = Vec::from("hello world");
data.resize(1024 * 1024, 0);

gl::CreateBuffers(1, &mut buf);
{
let data = data.as_ptr() as *const c_void;
gl::NamedBufferStorage(buf, 1024 * 1024, data, gl::DYNAMIC_STORAGE_BIT);
}
# }
# }
# }
#
# fn main() {
# App.run()
# }

Click eye-btn to expand / fold the code. copy-btn will copy all code into clipboard.