Skip to content
Snippets Groups Projects
Commit f5b2f4e3 authored by Per's avatar Per
Browse files

Initial commit

parent 72646f00
Branches
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ mod trusted {
static mut U1: u1::State = u1::State::new();
static mut U2: u2::State = u2::State {};
static mut U2: u2::State = u2::State::new();
// Main should be inside trusted
fn main() {
......@@ -104,8 +104,16 @@ mod u1 {
mod u2 {
use ::*;
pub struct State {}
pub struct State {
key: &'static str,
}
impl State {
pub const fn new() -> Self {
State { key: &*"---" }
}
pub fn user2(&mut self, sec: &Sec, u1: &mut u1::State) {
println!("user2, level = {}", sec.level());
let s = auth("abc");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment