浏览代码

cargo-fmt and include new dependencies for tests

Vecna 2 月之前
父节点
当前提交
63ed7b2951
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 2 0
      Cargo.toml
  2. 6 1
      src/positive_report.rs

+ 2 - 0
Cargo.toml

@@ -7,6 +7,7 @@ edition = "2021"
 
 [dependencies]
 array-bytes = "6.2.0"
+base64 = "0.21.7"
 bincode = "1"
 chrono = "0.4"
 clap = { version = "4.4.14", features = ["derive"] }
@@ -21,6 +22,7 @@ hyper-util = { version = "0.1", features = ["full"] }
 julianday = "1.2.0"
 lazy_static = "1"
 lox-library = { git = "https://gitlab.torproject.org/vecna/lox.git", version = "0.1.0" }
+rand = "0.8.5"
 serde = "1.0.197"
 serde_json = "1.0"
 serde_with = {version = "3.7.0", features = ["json"]}

+ 6 - 1
src/positive_report.rs

@@ -73,7 +73,12 @@ impl PositiveReport {
         country: String,
     ) -> Result<Self, lox_library::proto::positive_report::requestproof::ProofError> {
         let lox_proof = lox_pr::request(lox_cred, lox_pub)?;
-        Ok(PositiveReport::new(bridge_id, bridge_token, lox_proof, country))
+        Ok(PositiveReport::new(
+            bridge_id,
+            bridge_token,
+            lox_proof,
+            country,
+        ))
     }
 
     /// Convert report to a serializable version