File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ license = "MIT"
1313readme = " README.md"
1414documentation = " https://docs.rs/multihash/"
1515edition = " 2021"
16- rust-version = " 1.64 "
16+ rust-version = " 1.87 "
1717
1818[package .metadata .docs .rs ]
1919all-features = true
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Then run `cargo build`.
3535
3636## MSRV
3737
38- The minimum supported Rust version for this library is ` 1.64 .0 ` .
38+ The minimum supported Rust version for this library is ` 1.87 .0 ` .
3939This is only guaranteed without additional features activated.
4040
4141## Usage
Original file line number Diff line number Diff line change @@ -62,11 +62,9 @@ impl<const S: usize> Multihash<S> {
6262 }
6363 let size = input_digest. len ( ) ;
6464 let mut digest = [ 0 ; S ] ;
65- let mut i = 0 ;
66- while i < size {
67- digest[ i] = input_digest[ i] ;
68- i += 1 ;
69- }
65+ // NOTE: cant use range systax in const fn yet
66+ digest. split_at_mut ( size) . 0 . copy_from_slice ( input_digest) ;
67+
7068 Ok ( Self {
7169 code,
7270 size : size as u8 ,
You can’t perform that action at this time.
0 commit comments