Skip to content

Commit 29a328b

Browse files
committed
fix(voting-tools-rs): code format
1 parent 562b524 commit 29a328b

File tree

1 file changed

+14
-7
lines changed
  • src/voting-tools-rs/src/data

1 file changed

+14
-7
lines changed

src/voting-tools-rs/src/data/mod.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl RawRegistration {
225225
&self,
226226
cddl_config: &CddlConfig,
227227
network_id: NetworkId,
228-
slot_no: SlotNo
228+
slot_no: SlotNo,
229229
) -> Result<SignedRegistration, Box<dyn Error>> {
230230
// validate cddl: 61284
231231
validate_reg_cddl(&self.bin_reg, cddl_config)?;
@@ -246,7 +246,11 @@ impl RawRegistration {
246246
})
247247
}
248248

249-
fn raw_reg_conversion(&self, network_id: NetworkId, slot_no: SlotNo) -> Result<Registration, Box<dyn Error>> {
249+
fn raw_reg_conversion(
250+
&self,
251+
network_id: NetworkId,
252+
slot_no: SlotNo,
253+
) -> Result<Registration, Box<dyn Error>> {
250254
let decoded: ciborium::value::Value =
251255
ciborium::de::from_reader(Cursor::new(&self.bin_reg))?;
252256

@@ -284,11 +288,14 @@ impl RawRegistration {
284288

285289
// A nonce that identifies that most recent delegation
286290
let nonce = match inspect_nonce(metamap) {
287-
Ok(value) => if value.0 < slot_no.0 { // Don't allow nonce > slot number
288-
value
289-
} else {
290-
Nonce(slot_no.0)
291-
},
291+
Ok(value) => {
292+
if value.0 < slot_no.0 {
293+
// Don't allow nonce > slot number
294+
value
295+
} else {
296+
Nonce(slot_no.0)
297+
}
298+
}
292299
Err(value) => return value,
293300
};
294301

0 commit comments

Comments
 (0)