Skip to content

Commit 8bb22f1

Browse files
committed
Fixing clippy suggestions
1 parent 9cae974 commit 8bb22f1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

rust/basic_bitcoin/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ use std::cell::Cell;
1717
/// This struct carries network-specific context:
1818
/// - `network`: The ICP Bitcoin API network enum.
1919
/// - `bitcoin_network`: The corresponding network enum from the `bitcoin` crate, used
20-
/// for address formatting and transaction construction.
20+
/// for address formatting and transaction construction.
2121
/// - `key_name`: The global ECDSA key name used when requesting derived keys or making
22-
/// signatures. Different key names are used locally and when deployed on the IC.
22+
/// signatures. Different key names are used locally and when deployed on the IC.
2323
///
2424
/// Note: Both `network` and `bitcoin_network` are needed because ICP and the
2525
/// Bitcoin library use distinct network enum types.

rust/basic_bitcoin/src/ordinals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub(crate) async fn build_reveal_transaction(
4848
let transaction = build_reveal_transaction_with_fee(
4949
reveal_script,
5050
control_block,
51-
&commit_tx_id,
51+
commit_tx_id,
5252
destination_address,
5353
fee,
5454
)
@@ -93,7 +93,7 @@ pub fn build_reveal_transaction_with_fee(
9393

9494
// Create output that sends remaining funds (minus fee) to destination.
9595
// The inscription is now "bound" to these satoshis according to ordinal theory.
96-
// In production: Ensure the fee is smaller than the output value to avoid
96+
// In production: Ensure the fee is smaller than the output value to avoid
9797
// underflow scenarios.
9898
let output = TxOut {
9999
value: Amount::from_sat(INSCRIPTION_OUTPUT_VALUE - fee),

rust/basic_bitcoin/src/runes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,19 +197,19 @@ pub fn build_etching_script(etching: &Etching) -> Result<ScriptBuf, String> {
197197
}
198198
if let Some(start) = terms.height.0 {
199199
payload.extend_from_slice(&encode_leb128(Tag::HeightStart as u64));
200-
payload.extend_from_slice(&encode_leb128(start as u64));
200+
payload.extend_from_slice(&encode_leb128(start));
201201
}
202202
if let Some(end) = terms.height.1 {
203203
payload.extend_from_slice(&encode_leb128(Tag::HeightEnd as u64));
204-
payload.extend_from_slice(&encode_leb128(end as u64));
204+
payload.extend_from_slice(&encode_leb128(end));
205205
}
206206
if let Some(start) = terms.offset.0 {
207207
payload.extend_from_slice(&encode_leb128(Tag::OffsetStart as u64));
208-
payload.extend_from_slice(&encode_leb128(start as u64));
208+
payload.extend_from_slice(&encode_leb128(start));
209209
}
210210
if let Some(end) = terms.offset.1 {
211211
payload.extend_from_slice(&encode_leb128(Tag::OffsetEnd as u64));
212-
payload.extend_from_slice(&encode_leb128(end as u64));
212+
payload.extend_from_slice(&encode_leb128(end));
213213
}
214214
}
215215

rust/basic_bitcoin/src/service/etch_rune.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub async fn etch_rune(name: String) -> String {
9191
// Build the runestone script containing the rune metadata.
9292
// This creates the OP_RETURN output that defines the new token.
9393
let runestone_script = build_etching_script(&etching)
94-
.unwrap_or_else(|e| trap(&format!("Failed to build runestone: {}", e)));
94+
.unwrap_or_else(|e| trap(format!("Failed to build runestone: {}", e)));
9595

9696
// Build the rune etching transaction.
9797
// The transaction includes an OP_RETURN output with the encoded runestone.

0 commit comments

Comments
 (0)