Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
Initial sign to Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
22388o committed Jun 26, 2024
1 parent aaa5721 commit 35ce2a0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions frost rust/sign.rs
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
use std::collections::HashMap;
use std::fs::File;

use crate::Sign;

pub fn load_signs() -> HashMap<String, Sign> {

let mut signs = HashMap::new();
let file = File::open("signs.json").unwrap();
let signs_json: Vec<Sign> = serde_json::from_reader(file).unwrap();
for sign in signs_json {
signs.insert(sign.name.clone(), sign);
}

0 comments on commit 35ce2a0

Please sign in to comment.