Skip to content

Commit 9d1d82c

Browse files
authored
refactor: remove redundant type casts in push_bytes macro
1 parent 5e75afe commit 9d1d82c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bitcoin/src/blockdata/script/push_bytes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ mod primitive {
167167

168168
impl From<[u8; $len]> for PushBytesBuf {
169169
fn from(bytes: [u8; $len]) -> Self {
170-
PushBytesBuf(Vec::from(&bytes as &[_]))
170+
PushBytesBuf(Vec::from(&bytes))
171171
}
172172
}
173173

174174
impl<'a> From<&'a [u8; $len]> for PushBytesBuf {
175175
fn from(bytes: &'a [u8; $len]) -> Self {
176-
PushBytesBuf(Vec::from(bytes as &[_]))
176+
PushBytesBuf(Vec::from(bytes))
177177
}
178178
}
179179
)*

0 commit comments

Comments
 (0)