Skip to content

Commit 0146526

Browse files
committed
fix: update rust-toolchain to match proofs
fix: required clippy updates
1 parent 5f6f27d commit 0146526

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.70.0
1+
1.83.0

src/registry.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,8 @@ mod tests {
982982
}
983983

984984
fn test_porep_id_aux(rsp: &RegisteredSealProof) {
985+
use std::fmt::Write;
986+
985987
let expected_porep_id = match rsp {
986988
RegisteredSealProof::StackedDrg2KiBV1 => {
987989
"0000000000000000000000000000000000000000000000000000000000000000"
@@ -1044,11 +1046,11 @@ mod tests {
10441046
"1300000000000000000000000000000000000000000000000000000000000000"
10451047
}
10461048
};
1047-
let hex: String = rsp
1048-
.porep_id()
1049-
.iter()
1050-
.map(|x| format!("{:01$x}", x, 2))
1051-
.collect();
1049+
let hex: String = rsp.porep_id().iter().fold(String::new(), |mut output, x| {
1050+
//let _ = write!("{:01$x}", x, 2);
1051+
let _ = write!(output, "{:01$x}", x, 2);
1052+
output
1053+
});
10521054

10531055
assert_eq!(expected_porep_id, &hex);
10541056
}

src/seal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,7 @@ pub fn unseal_range<T: Into<PathBuf> + AsRef<Path>, R: Read, W: Write>(
18041804
///
18051805
/// * `registered_proof` - Selected seal proof for this byte source.
18061806
/// * `source` - A readable source of unprocessed piece bytes. The piece's commitment will be
1807-
/// generated for the bytes read from the source plus any added padding.
1807+
/// generated for the bytes read from the source plus any added padding.
18081808
/// * `piece_size` - The number of unpadded user-bytes which can be read from source before EOF.
18091809
///
18101810
/// Returns piece commitment in [`PieceInfo`] struct.

0 commit comments

Comments
 (0)