Skip to content

Commit c871c05

Browse files
authored
Merge branch 'develop' into sidecar-scripts
2 parents e585d25 + ca523fb commit c871c05

File tree

10 files changed

+17
-14
lines changed

10 files changed

+17
-14
lines changed

clarity/src/vm/docs/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2082,7 +2082,8 @@ type defined using `define-fungible-token`. The increased token balance is _not_
20822082
rather minted.
20832083
20842084
If a non-positive amount is provided to mint, this function returns `(err 1)`. Otherwise, on successfuly mint, it
2085-
returns `(ok true)`.
2085+
returns `(ok true)`. If this call would result in more supplied tokens than defined by the total supply in
2086+
`define-fungible-token`, then a `SupplyOverflow` runtime error is thrown.
20862087
",
20872088
example: "
20882089
(define-fungible-token stackaroo)

stackslib/src/chainstate/stacks/db/transactions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,8 +2108,8 @@ pub mod test {
21082108
);
21092109

21102110
let contracts = vec![
2111-
contract_correct.clone(),
2112-
contract_correct.clone(),
2111+
contract_correct,
2112+
contract_correct,
21132113
contract_syntax_error, // should still be mined, even though analysis fails
21142114
];
21152115

stackslib/src/net/api/tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ impl<'a> TestRPC<'a> {
301301
let tx_coinbase_signed = tx_signer.get_tx().unwrap();
302302

303303
// next the contract
304-
let contract = TEST_CONTRACT.clone();
304+
let contract = TEST_CONTRACT;
305305
let mut tx_contract = StacksTransaction::new(
306306
TransactionVersion::Testnet,
307307
TransactionAuth::from_p2pkh(&privk1).unwrap(),
@@ -343,7 +343,7 @@ impl<'a> TestRPC<'a> {
343343
};
344344

345345
// make an unconfirmed contract
346-
let unconfirmed_contract = TEST_CONTRACT_UNCONFIRMED.clone();
346+
let unconfirmed_contract = TEST_CONTRACT_UNCONFIRMED;
347347
let mut tx_unconfirmed_contract = StacksTransaction::new(
348348
TransactionVersion::Testnet,
349349
TransactionAuth::from_p2pkh(&privk1).unwrap(),

stackslib/src/net/atlas/download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ impl BatchedDNSLookupsState {
724724
match url.host() {
725725
Some(url::Host::Domain(domain)) => {
726726
let res = dns_client.queue_lookup(
727-
domain.clone(),
727+
domain,
728728
port,
729729
get_epoch_time_ms() + connection_options.dns_timeout,
730730
);

stackslib/src/net/download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ impl BlockDownloader {
350350
match url.host() {
351351
Some(url::Host::Domain(domain)) => {
352352
match dns_client.queue_lookup(
353-
domain.clone(),
353+
domain,
354354
port,
355355
get_epoch_time_ms() + self.dns_timeout,
356356
) {

stackslib/src/net/p2p.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3483,7 +3483,7 @@ impl PeerNetwork {
34833483
if let Some(ref mut dns_client) = dns_client_opt {
34843484
// begin DNS query
34853485
match dns_client.queue_lookup(
3486-
domain.clone(),
3486+
domain,
34873487
port,
34883488
get_epoch_time_ms() + self.connection_opts.dns_timeout,
34893489
) {

stackslib/src/net/stackerdb/config.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/// This file implements the interface to the StackerDB smart contract for loading the DB's config.
1818
/// The smart contract must conform to this trait:
1919
///
20+
/// ```clarity,ignore
2021
/// ;; Any StackerDB smart contract must conform to this trait.
2122
/// (define-trait stackerdb-trait
2223
///
@@ -34,6 +35,7 @@
3435
/// },
3536
/// uint))
3637
/// )
38+
/// ```
3739
use std::collections::{HashMap, HashSet};
3840
use std::mem;
3941

stackslib/src/util_lib/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ fn log_sql_eqp(conn: &Connection, sql_query: &str) {
353353
return;
354354
}
355355

356-
let mut parts = sql_query.clone().split(" ");
356+
let mut parts = sql_query.split(" ");
357357
let mut full_sql = if let Some(part) = parts.next() {
358358
part.to_string()
359359
} else {

stackslib/src/util_lib/strings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ mod test {
331331
fn tx_stacks_strings_codec() {
332332
let s = "hello-world";
333333
let stacks_str = StacksString::from_str(&s).unwrap();
334-
let clarity_str = ClarityName::try_from(s.clone()).unwrap();
335-
let contract_str = ContractName::try_from(s.clone()).unwrap();
334+
let clarity_str = ClarityName::try_from(s).unwrap();
335+
let contract_str = ContractName::try_from(s).unwrap();
336336

337337
assert_eq!(stacks_str[..], s.as_bytes().to_vec()[..]);
338338
let s2 = stacks_str.to_string();

testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ pub fn get_satoshis_per_byte(config: &Config) -> u64 {
166166

167167
#[cfg(test)]
168168
mod tests {
169-
use crate::config::DEFAULT_SATS_PER_VB;
170-
171-
use super::*;
172169
use std::env::temp_dir;
173170
use std::fs::File;
174171
use std::io::Write;
175172

173+
use super::*;
174+
use crate::config::DEFAULT_SATS_PER_VB;
175+
176176
#[test]
177177
fn test_get_satoshis_per_byte() {
178178
let dir = temp_dir();

0 commit comments

Comments
 (0)