Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Commit 32316d1

Browse files
committed
chore: address clippy
Signed-off-by: yHSJ <josh@securitybot.info>
1 parent 402094c commit 32316d1

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

crates/uplc/src/flat/data.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ impl<'a, 'b> minicbor::decode::Decode<'b, Ctx<'a>> for &'a PlutusData<'a> {
5353
}
5454
_ => {
5555
let e = minicbor::decode::Error::message(format!(
56-
"unknown tag for plutus data tag: {}",
57-
tag
56+
"unknown tag for plutus data tag: {tag}",
5857
));
5958

6059
Err(e)

crates/uplc/src/machine/runtime.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,6 +2195,7 @@ impl<'a> Machine<'a> {
21952195
// So our result is:
21962196
// [DE F1 20 00]
21972197
let complement_shift = 8 - bit_shift;
2198+
#[allow(clippy::needless_range_loop)]
21982199
for i in 0..(length - byte_shift) {
21992200
let src_idx = i + byte_shift;
22002201

@@ -2212,6 +2213,7 @@ impl<'a> Machine<'a> {
22122213
} else {
22132214
// See left shift case for explanation, but invert all operations
22142215
let complement_shift = 8 - bit_shift;
2216+
#[allow(clippy::needless_range_loop)]
22152217
for i in 0..(length - byte_shift) {
22162218
let dst_idx = i + byte_shift;
22172219
result[dst_idx] = bytes[i] >> bit_shift;
@@ -2223,7 +2225,7 @@ impl<'a> Machine<'a> {
22232225
}
22242226
}
22252227

2226-
Ok(Value::byte_string(&self.arena, result))
2228+
Ok(Value::byte_string(self.arena, result))
22272229
}
22282230
DefaultFunction::RotateByteString => {
22292231
let bytes = runtime.args[0].unwrap_byte_string()?;
@@ -2264,7 +2266,7 @@ impl<'a> Machine<'a> {
22642266
} else {
22652267
let complement_shift = 8 - bit_shift;
22662268
let wraparound_bits = bytes[0] >> complement_shift;
2267-
2269+
#[allow(clippy::needless_range_loop)]
22682270
for i in 0..(length - byte_shift) {
22692271
let src_idx = i + byte_shift;
22702272

0 commit comments

Comments
 (0)