Formatting fixes for entire project

This commit is contained in:
onyinyang 2023-07-19 10:37:09 -04:00
parent d98ae40879
commit 7f92ea6833
No known key found for this signature in database
GPG Key ID: 156A6435430C2036
2 changed files with 13 additions and 9 deletions

View File

@ -8,7 +8,10 @@ use lox_library::{
}, },
BridgeAuth, BridgeDb, IssuerPubKey, BridgeAuth, BridgeDb, IssuerPubKey,
}; };
use std::{sync::{Arc, Mutex}, collections::HashMap}; use std::{
collections::HashMap,
sync::{Arc, Mutex},
};
use zkp::ProofError; use zkp::ProofError;
#[derive(Clone)] #[derive(Clone)]
@ -78,13 +81,13 @@ impl LoxServerContext {
result result
} }
/* Uncomment when bridge blocking is finalized /* Uncomment when bridge blocking is finalized
pub fn add_unreachable(&self, bridgeline: BridgeLine) -> bool { pub fn add_unreachable(&self, bridgeline: BridgeLine) -> bool {
let mut ba_obj = self.ba.lock().unwrap(); let mut ba_obj = self.ba.lock().unwrap();
let mut db_obj = self.db.lock().unwrap(); let mut db_obj = self.db.lock().unwrap();
ba_obj.bridge_unreachable(&bridgeline, &mut db_obj) ba_obj.bridge_unreachable(&bridgeline, &mut db_obj)
} }
*/ */
pub fn update_bridge(&self, bridgeline: BridgeLine) -> bool { pub fn update_bridge(&self, bridgeline: BridgeLine) -> bool {
let mut ba_obj = self.ba.lock().unwrap(); let mut ba_obj = self.ba.lock().unwrap();

View File

@ -92,7 +92,8 @@ pub fn validate(invite: &[u8]) -> Result<[u8; OPENINV_LENGTH], TryFromSliceError
pub fn generate_reachability_cred(lox_cred: &Lox, encrypted_table: String) -> BucketReachability { pub fn generate_reachability_cred(lox_cred: &Lox, encrypted_table: String) -> BucketReachability {
let (id, key) = from_scalar(lox_cred.bucket).unwrap(); let (id, key) = from_scalar(lox_cred.bucket).unwrap();
let enc_buckets: EncBridgeTable = serde_json::from_str(&encrypted_table).unwrap(); let enc_buckets: EncBridgeTable = serde_json::from_str(&encrypted_table).unwrap();
let bucket = BridgeTable::decrypt_bucket(id, &key, enc_buckets.etable.get(&id).unwrap()).unwrap(); let bucket =
BridgeTable::decrypt_bucket(id, &key, enc_buckets.etable.get(&id).unwrap()).unwrap();
bucket.1.unwrap() bucket.1.unwrap()
} }