Skip to content

Update ch05-02-taproot.md #124

Update ch05-02-taproot.md

Update ch05-02-taproot.md #124

Triggered via push January 1, 2024 21:00
Status Success
Total duration 14s
Artifacts

learn-sapio.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

94 warnings
deploy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
unused `std::result::Result` that must be used: cli/src/contracts/server.rs#L48
warning: unused `std::result::Result` that must be used --> cli/src/contracts/server.rs:48:25 | 48 | resp.send(req.handle().await); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default help: use `let _ = ...` to ignore the resulting value | 48 | let _ = resp.send(req.handle().await); | +++++++
the borrowed expression implements the required traits: cli/src/main.rs#L317
warning: the borrowed expression implements the required traits --> cli/src/main.rs:317:70 | 317 | std::fs::write(args.value_of_os("out").unwrap(), &base64::encode(bytes))?; | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `base64::encode(bytes)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: cli/src/main.rs#L267
warning: the borrowed expression implements the required traits --> cli/src/main.rs:267:46 | 267 | std::fs::write(file_out, &base64::encode(bytes))?; | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `base64::encode(bytes)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: cli/src/util.rs#L46
warning: the borrowed expression implements the required traits --> cli/src/util.rs:46:25 | 46 | &base64::decode(&if let Some(psbt) = psbt_str { | _________________________^ 47 | | psbt.into() 48 | | } else { 49 | | let mut s = String::new(); 50 | | tokio::io::stdin().read_to_string(&mut s).await?; 51 | | s 52 | | })?[..], | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default help: change this to | 46 ~ &base64::decode(if let Some(psbt) = psbt_str { 47 + psbt.into() 48 + } else { 49 + let mut s = String::new(); 50 + tokio::io::stdin().read_to_string(&mut s).await?; 51 + s 52 ~ })?[..], |
very complex type used. Consider factoring parts into `type` definitions: cli/src/contracts/server.rs#L26
warning: very complex type used. Consider factoring parts into `type` definitions --> cli/src/contracts/server.rs:26:21 | 26 | pub fn new() -> ( | _____________________^ 27 | | Self, 28 | | UnboundedSender<(Request, oneshot::Sender<Response>)>, 29 | | broadcast::Sender<()>, 30 | | ) { | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
casting to the same type is unnecessary (`u32` -> `u32`): cli/src/contracts/request.rs#L338
warning: casting to the same type is unnecessary (`u32` -> `u32`) --> cli/src/contracts/request.rs:338:38 | 338 | OutPoint::new(tx.txid(), vout as u32), | ^^^^^^^^^^^ help: try: `vout` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: cli/src/config.rs#L105
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> cli/src/config.rs:105:28 | 105 | pub fn serialize<S>(p: &PathBuf, s: S) -> Result<S::Ok, S::Error> | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: cli/src/config.rs#L96
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> cli/src/config.rs:96:1 | 96 | impl Into<PathBuf> for PathBufWrapped { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `#[warn(clippy::from_over_into)]` on by default help: replace the `Into` implementation with `From<config::PathBufWrapped>` | 96 ~ impl From<PathBufWrapped> for PathBuf { 97 ~ fn from(val: PathBufWrapped) -> Self { 98 ~ val.0 |
unused import: `Write`: cli/src/contracts/request.rs#L31
warning: unused import: `Write` --> cli/src/contracts/request.rs:31:36 | 31 | use std::fmt::{Display, Formatter, Write}; | ^^^^^ | = note: `#[warn(unused_imports)]` on by default
very complex type used. Consider factoring parts into `type` definitions: sapio-contrib/src/contracts/tic_tac_toe.rs#L72
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio-contrib/src/contracts/tic_tac_toe.rs:72:12 | 72 | cache: Arc<Mutex<BTreeMap<(&'static str, Board, Tile), Vec<Template>>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
this `as_str` is redundant and can be removed as the method immediately following exists on `String` too: sapio-contrib/src/contracts/op_return_chain.rs#L50
warning: this `as_str` is redundant and can be removed as the method immediately following exists on `String` too --> sapio-contrib/src/contracts/op_return_chain.rs:50:48 | 50 | &Compiled::from_op_return(data.as_str().as_bytes())?, | ^^^^^^^^^^^^^^^^^ help: try: `as_bytes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_as_str = note: `#[warn(clippy::redundant_as_str)]` on by default
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: sapio-contrib/src/contracts/hanukkah.rs#L111
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> sapio-contrib/src/contracts/hanukkah.rs:111:1 | 111 | impl Into<String> for Recipients { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `#[warn(clippy::from_over_into)]` on by default help: replace the `Into` implementation with `From<contracts::hanukkah::Recipients>` | 111 ~ impl From<Recipients> for String { 112 ~ fn from(val: Recipients) -> Self { 113 ~ val.0 |
use of `default` to create a unit struct: sapio-contrib/src/contracts/federated_sidechain.rs#L77
warning: use of `default` to create a unit struct --> sapio-contrib/src/contracts/federated_sidechain.rs:77:37 | 77 | _pd: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
very complex type used. Consider factoring parts into `type` definitions: sapio-contrib/src/contracts/dynamic.rs#L59
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio-contrib/src/contracts/dynamic.rs:59:16 | 59 | let v: Vec<fn() -> Option<actions::ThenFuncAsFinishOrFunc<'static, D<'static>, ()>>> = | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
the following explicit lifetimes could be elided: 'a: sapio-contrib/src/contracts/dynamic.rs#L48
warning: the following explicit lifetimes could be elided: 'a --> sapio-contrib/src/contracts/dynamic.rs:48:22 | 48 | fn ensure_amount<'a>(&'a self, _ctx: Context) -> Result<Amount, CompilationError> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 48 - fn ensure_amount<'a>(&'a self, _ctx: Context) -> Result<Amount, CompilationError> { 48 + fn ensure_amount(&self, _ctx: Context) -> Result<Amount, CompilationError> { |
the following explicit lifetimes could be elided: 'a: sapio-contrib/src/contracts/dynamic.rs#L45
warning: the following explicit lifetimes could be elided: 'a --> sapio-contrib/src/contracts/dynamic.rs:45:17 | 45 | fn metadata<'a>(&'a self, _ctx: Context) -> Result<ObjectMetadata, CompilationError> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 45 - fn metadata<'a>(&'a self, _ctx: Context) -> Result<ObjectMetadata, CompilationError> { 45 + fn metadata(&self, _ctx: Context) -> Result<ObjectMetadata, CompilationError> { |
the following explicit lifetimes could be elided: 'a: sapio-contrib/src/contracts/dynamic.rs#L42
warning: the following explicit lifetimes could be elided: 'a --> sapio-contrib/src/contracts/dynamic.rs:42:22 | 42 | fn get_inner_ref<'a>(&'a self) -> &Self { | ^^ ^^ ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 42 - fn get_inner_ref<'a>(&'a self) -> &Self { 42 + fn get_inner_ref(&self) -> &Self { |
the following explicit lifetimes could be elided: 'a: sapio-contrib/src/contracts/dynamic.rs#L39
warning: the following explicit lifetimes could be elided: 'a --> sapio-contrib/src/contracts/dynamic.rs:39:19 | 39 | fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<Self>>] { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 39 - fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<Self>>] { 39 + fn finish_fns(&self) -> &[fn() -> Option<actions::Guard<Self>>] { |
the following explicit lifetimes could be elided: 'a: sapio-contrib/src/contracts/dynamic.rs#L34
warning: the following explicit lifetimes could be elided: 'a --> sapio-contrib/src/contracts/dynamic.rs:34:22 | 34 | fn finish_or_fns<'a>( | ^^ 35 | &'a self, | ^^ 36 | ) -> &'a [fn() -> Option<Box<dyn actions::CallableAsFoF<Self, Self::StatefulArguments>>>] { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 34 ~ fn finish_or_fns( 35 ~ &self, 36 ~ ) -> &[fn() -> Option<Box<dyn actions::CallableAsFoF<Self, Self::StatefulArguments>>>] { |
very complex type used. Consider factoring parts into `type` definitions: sapio-contrib/src/contracts/dynamic.rs#L20
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio-contrib/src/contracts/dynamic.rs:20:8 | 20 | v: Vec<fn() -> Option<actions::ThenFuncAsFinishOrFunc<'a, D<'a>, ()>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
casting to the same type is unnecessary (`u64` -> `u64`): sapio-contrib/src/contracts/derivatives/risk_reversal.rs#L132
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> sapio-contrib/src/contracts/derivatives/risk_reversal.rs:132:33 | 132 | .derive_num(strike as u64)? | ^^^^^^^^^^^^^ help: try: `strike` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): sapio-contrib/src/contracts/derivatives/put.rs#L44
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> sapio-contrib/src/contracts/derivatives/put.rs:44:33 | 44 | .derive_num(price as u64)? | ^^^^^^^^^^^^ help: try: `price` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): sapio-contrib/src/contracts/derivatives/call.rs#L48
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> sapio-contrib/src/contracts/derivatives/call.rs:48:33 | 48 | .derive_num(price as u64)? | ^^^^^^^^^^^^ help: try: `price` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
this `impl` can be derived: sapio-contrib/src/contracts/coin_pool.rs#L134
warning: this `impl` can be derived --> sapio-contrib/src/contracts/coin_pool.rs:134:1 | 134 | / impl Default for UpdateTypes { 135 | | fn default() -> Self { 136 | | UpdateTypes::NoUpdate 137 | | } 138 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it... | 114 + #[derive(Default)] 115 | pub enum UpdateTypes { | help: ...and mark the default variant | 132 ~ #[default] 133 ~ NoUpdate, |
useless conversion to the same type: `sapio_bitcoin::util::amount::CoinAmount`: sapio-contrib/src/contracts/channel.rs#L273
warning: useless conversion to the same type: `sapio_bitcoin::util::amount::CoinAmount` --> sapio-contrib/src/contracts/channel.rs:273:29 | 273 | amount: self.amount.try_into().unwrap(), | ^^^^^^^^^^^^^^^^^^^^^^ | = help: consider removing `.try_into()` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
very complex type used. Consider factoring parts into `type` definitions: sapio-contrib/src/contracts/channel.rs#L158
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio-contrib/src/contracts/channel.rs:158:30 | 158 | static ref DB_TYPES: Mutex<BTreeMap<String, fn(&str) -> Arc<Mutex<dyn DB>>>> = | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
this `impl` can be derived: sapio-contrib/src/contracts/channel.rs#L111
warning: this `impl` can be derived --> sapio-contrib/src/contracts/channel.rs:111:1 | 111 | / impl Default for Args { 112 | | fn default() -> Self { 113 | | Args::None 114 | | } 115 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it... | 105 + #[derive(Default)] 106 | pub enum Args { | help: ...and mark the default variant | 109 ~ #[default] 110 ~ None, |
function `candles_left` is never used: sapio-contrib/src/contracts/hanukkah.rs#L34
warning: function `candles_left` is never used --> sapio-contrib/src/contracts/hanukkah.rs:34:4 | 34 | fn candles_left(s: u8) -> u8 { | ^^^^^^^^^^^^
variants `LinearPositive`, `GeometricPositive`, and `Sigmoid` are never constructed: sapio-contrib/src/contracts/derivatives/dlc.rs#L142
warning: variants `LinearPositive`, `GeometricPositive`, and `Sigmoid` are never constructed --> sapio-contrib/src/contracts/derivatives/dlc.rs:142:5 | 139 | enum SplitFunctions { | -------------- variants in this enum ... 142 | LinearPositive(Intercept), | ^^^^^^^^^^^^^^ 143 | /// A Geometric starting at the intercept parameter to 1.0 144 | GeometricPositive(Intercept), | ^^^^^^^^^^^^^^^^^ ... 149 | Sigmoid(Offset), | ^^^^^^^ | = note: `SplitFunctions` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
field `url` is never read: sapio-contrib/src/contracts/derivatives/dlc.rs#L30
warning: field `url` is never read --> sapio-contrib/src/contracts/derivatives/dlc.rs:30:5 | 29 | struct BasicOracle { | ----------- field in this struct 30 | url: String, | ^^^
function `register_db` is never used: sapio-contrib/src/contracts/channel.rs#L162
warning: function `register_db` is never used --> sapio-contrib/src/contracts/channel.rs:162:12 | 162 | pub fn register_db(s: String, f: fn(&str) -> Arc<Mutex<dyn DB>>) { | ^^^^^^^^^^^
fields `revoke` and `split` are never read: sapio-contrib/src/contracts/channel.rs#L89
warning: fields `revoke` and `split` are never read --> sapio-contrib/src/contracts/channel.rs:89:5 | 87 | pub struct Update { | ------ fields in this struct 88 | /// hash to revoke 89 | revoke: bitcoin::hashes::sha256::Hash, | ^^^^^^ 90 | /// the balances of the channel 91 | split: (CoinAmount, CoinAmount), | ^^^^^ | = note: `Update` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis = note: `#[warn(dead_code)]` on by default
unused `std::result::Result` that must be used: examples/dcf_mining_pool/src/main.rs#L121
warning: unused `std::result::Result` that must be used --> examples/dcf_mining_pool/src/main.rs:121:13 | 121 | v.await; | ^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default help: use `let _ = ...` to ignore the resulting value | 121 | let _ = v.await; | +++++++
empty `loop {}` wastes CPU cycles: examples/dcf_mining_pool/src/main.rs#L210
warning: empty `loop {}` wastes CPU cycles --> examples/dcf_mining_pool/src/main.rs:210:5 | 210 | loop {} | ^^^^^^^ | = help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop = note: `#[warn(clippy::empty_loop)]` on by default
method `compute_for_block` is never used: examples/dcf_mining_pool/src/main.rs#L69
warning: method `compute_for_block` is never used --> examples/dcf_mining_pool/src/main.rs:69:14 | 68 | impl Coordinator { | ---------------- method in this implementation 69 | async fn compute_for_block( | ^^^^^^^^^^^^^^^^^
struct `Coordinator` is never constructed: examples/dcf_mining_pool/src/main.rs#L62
warning: struct `Coordinator` is never constructed --> examples/dcf_mining_pool/src/main.rs:62:8 | 62 | struct Coordinator { | ^^^^^^^^^^^
associated function `from_block` is never used: examples/dcf_mining_pool/src/main.rs#L33
warning: associated function `from_block` is never used --> examples/dcf_mining_pool/src/main.rs:33:8 | 32 | impl BlockNotes { | --------------- associated function in this implementation 33 | fn from_block(block: Block) -> BlockNotes { | ^^^^^^^^^^
field `participated` is never read: examples/dcf_mining_pool/src/main.rs#L29
warning: field `participated` is never read --> examples/dcf_mining_pool/src/main.rs:29:5 | 26 | struct BlockNotes { | ---------- field in this struct ... 29 | participated: Option<bool>, | ^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused doc comment: examples/dcf_mining_pool/src/main.rs#L186
warning: unused doc comment --> examples/dcf_mining_pool/src/main.rs:186:13 | 186 | /// all of the payments needing to be sent | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 187 | participants, | ------------ rustdoc does not generate documentation for expression fields | = help: use `//` for a plain comment = note: `#[warn(unused_doc_comments)]` on by default
use of deprecated associated function `sapio_bitcoin::util::bip32::ExtendedPubKey::from_private`: use ExtendedPubKey::from_priv: ctv_emulators/src/bin/main.rs#L24
warning: use of deprecated associated function `sapio_bitcoin::util::bip32::ExtendedPubKey::from_private`: use ExtendedPubKey::from_priv --> ctv_emulators/src/bin/main.rs:24:35 | 24 | let pk_root = ExtendedPubKey::from_private(&Secp256k1::new(), &root); | ^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: sapio-psbt/src/lib.rs#L219
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> sapio-psbt/src/lib.rs:219:27 | 219 | fingerprints_map: &'a Vec<(Fingerprint, &'a ExtendedPrivKey)>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&'a [(Fingerprint, &'a ExtendedPrivKey)]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: sapio-psbt/src/lib.rs#L188
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> sapio-psbt/src/lib.rs:188:27 | 188 | fingerprints_map: &Vec<(Fingerprint, &ExtendedPrivKey)>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[(Fingerprint, &ExtendedPrivKey)]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
you should consider adding a `Default` implementation for `API<Input, Output>`: plugins/src/lib.rs#L41
warning: you should consider adding a `Default` implementation for `API<Input, Output>` --> plugins/src/lib.rs:41:5 | 41 | / pub fn new() -> Self { 42 | | API { 43 | | arguments: schemars::schema_for!(Input), 44 | | returns: schemars::schema_for!(Output), 45 | | _pd: Default::default(), 46 | | } 47 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 35 + impl<Input, Output> Default for API<Input, Output> 36 + where 37 + Input: JsonSchema, 38 + Output: JsonSchema, 39 + { 40 + fn default() -> Self { 41 + Self::new() 42 + } 43 + } |
this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned: plugins/src/host/mod.rs#L232
warning: this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned --> plugins/src/host/mod.rs:232:22 | 232 | &String::from_utf8_lossy(&v[..path_len as usize]).to_owned(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned help: depending on intent, either make the Cow an Owned variant | 232 | &String::from_utf8_lossy(&v[..path_len as usize]).into_owned(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: or clone the Cow itself | 232 | &String::from_utf8_lossy(&v[..path_len as usize]).clone(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned: plugins/src/host/mod.rs#L219
warning: this `to_owned` call clones the Cow<'_, str> itself and does not cause the Cow<'_, str> contents to become owned --> plugins/src/host/mod.rs:219:22 | 219 | &String::from_utf8_lossy(&v[..json_len as usize]).to_owned(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_to_owned = note: `#[warn(clippy::suspicious_to_owned)]` on by default help: depending on intent, either make the Cow an Owned variant | 219 | &String::from_utf8_lossy(&v[..json_len as usize]).into_owned(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: or clone the Cow itself | 219 | &String::from_utf8_lossy(&v[..json_len as usize]).clone(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unsafe function's docs miss `# Safety` section: plugins/src/client/plugin.rs#L113
warning: unsafe function's docs miss `# Safety` section --> plugins/src/client/plugin.rs:113:5 | 113 | unsafe fn register(name: &'static str, logo: Option<&'static [u8]>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
unsafe function's docs miss `# Safety` section: plugins/src/client/plugin.rs#L63
warning: unsafe function's docs miss `# Safety` section --> plugins/src/client/plugin.rs:63:5 | 63 | / unsafe fn create_result( 64 | | p: *mut c_char, 65 | | c: *mut c_char, 66 | | ) -> Result<Self::Output, CompilationError> { | |_______________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
unsafe function's docs miss `# Safety` section: plugins/src/client/plugin.rs#L57
warning: unsafe function's docs miss `# Safety` section --> plugins/src/client/plugin.rs:57:5 | 57 | unsafe fn create(p: *mut c_char, c: *mut c_char) -> *mut c_char { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc = note: `#[warn(clippy::missing_safety_doc)]` on by default
unused variable: `japi`: sapio-trait/src/lib.rs#L17
warning: unused variable: `japi` --> sapio-trait/src/lib.rs:17:13 | 17 | let japi = api.get_api(); | ^^^^ help: if this is intentional, prefix it with an underscore: `_japi`
unused variable: `tag`: sapio-trait/src/lib.rs#L16
warning: unused variable: `tag` --> sapio-trait/src/lib.rs:16:13 | 16 | let tag = Self::get_example_for_api_checking(); | ^^^ help: if this is intentional, prefix it with an underscore: `_tag` | = note: `#[warn(unused_variables)]` on by default
casting to the same type is unnecessary (`usize` -> `usize`): ctv_emulators/src/msgs.rs#L46
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> ctv_emulators/src/msgs.rs:46:42 | 46 | || de::Error::invalid_length(self.0 as usize, &"Expected at least 4 bytes."); | ^^^^^^^^^^^^^^^ help: try: `self.0` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
name `PSBT` contains a capitalized acronym: ctv_emulators/src/msgs.rs#L20
warning: name `PSBT` contains a capitalized acronym --> ctv_emulators/src/msgs.rs:20:12 | 20 | pub struct PSBT(pub PartiallySignedTransaction); | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Psbt` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `#[warn(clippy::upper_case_acronyms)]` on by default
constant `MAX_MSG` is never used: ctv_emulators/src/lib.rs#L27
warning: constant `MAX_MSG` is never used --> ctv_emulators/src/lib.rs:27:7 | 27 | const MAX_MSG: usize = 1_000_000; | ^^^^^^^ | = note: `#[warn(dead_code)]` on by default
you should consider adding a `Default` implementation for `AmountRange`: sapio/src/util/amountrange.rs#L78
warning: you should consider adding a `Default` implementation for `AmountRange` --> sapio/src/util/amountrange.rs:78:5 | 78 | / pub fn new() -> AmountRange { 79 | | AmountRange { 80 | | min: None, 81 | | max: None, 82 | | } 83 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default help: try adding this | 76 + impl Default for AmountRange { 77 + fn default() -> Self { 78 + Self::new() 79 + } 80 + } |
you should consider adding a `Default` implementation for `TemplateMetadata`: sapio/src/template/mod.rs#L49
warning: you should consider adding a `Default` implementation for `TemplateMetadata` --> sapio/src/template/mod.rs:49:5 | 49 | / pub fn new() -> Self { 50 | | TemplateMetadata { 51 | | simp: BTreeMap::new(), 52 | | color: None, ... | 55 | | } 56 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 43 + impl Default for TemplateMetadata { 44 + fn default() -> Self { 45 + Self::new() 46 + } 47 + } |
use of a fallible conversion when an infallible one could be used: sapio/src/template/builder.rs#L230
warning: use of a fallible conversion when an infallible one could be used --> sapio/src/template/builder.rs:230:27 | 230 | let default_seq = RelTime::try_from(0).unwrap().into(); | ^^^^^^^^^^^^^^^^^ help: use: `From::from` | = note: converting `u16` to `LockTime<Rel, MTP>` cannot fail = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
this `impl` can be derived: sapio/src/template/output.rs#L42
warning: this `impl` can be derived --> sapio/src/template/output.rs:42:1 | 42 | / impl Default for OutputMeta { 43 | | fn default() -> Self { 44 | | OutputMeta { 45 | | extra: Default::default(), ... | 48 | | } 49 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = help: remove the manual implementation... help: ...and instead derive it | 13 + #[derive(Default)] 14 | pub struct OutputMeta { |
this `impl` can be derived: sapio/src/template/input.rs#L56
warning: this `impl` can be derived --> sapio/src/template/input.rs:56:1 | 56 | / impl Default for InputMetadata { 57 | | fn default() -> Self { 58 | | InputMetadata { 59 | | extra: Default::default(), ... | 62 | | } 63 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `#[warn(clippy::derivable_impls)]` on by default = help: remove the manual implementation... help: ...and instead derive it | 13 + #[derive(Default)] 14 | pub struct InputMetadata { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L190
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:190:22 | 190 | fn ensure_amount<'a>(&'a self, ctx: Context) -> Result<Amount, CompilationError> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 190 - fn ensure_amount<'a>(&'a self, ctx: Context) -> Result<Amount, CompilationError> { 190 + fn ensure_amount(&self, ctx: Context) -> Result<Amount, CompilationError> { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L187
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:187:17 | 187 | fn metadata<'a>(&'a self, ctx: Context) -> Result<ObjectMetadata, CompilationError> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 187 - fn metadata<'a>(&'a self, ctx: Context) -> Result<ObjectMetadata, CompilationError> { 187 + fn metadata(&self, ctx: Context) -> Result<ObjectMetadata, CompilationError> { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L183
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:183:22 | 183 | fn get_inner_ref<'a>(&'a self) -> &Self::Ref { | ^^ ^^ ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 183 - fn get_inner_ref<'a>(&'a self) -> &Self::Ref { 183 + fn get_inner_ref(&self) -> &Self::Ref { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L180
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:180:19 | 180 | fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<Self::Ref>>] { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 180 - fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<Self::Ref>>] { 180 + fn finish_fns(&self) -> &[fn() -> Option<actions::Guard<Self::Ref>>] { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L174
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:174:22 | 174 | fn finish_or_fns<'a>( | ^^ 175 | &'a self, | ^^ 176 | ) -> &'a [fn() -> Option<Box<dyn actions::CallableAsFoF<Self::Ref, Self::StatefulArguments>>>] | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 174 ~ fn finish_or_fns( 175 ~ &self, 176 ~ ) -> &[fn() -> Option<Box<dyn actions::CallableAsFoF<Self::Ref, Self::StatefulArguments>>>] |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L154
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:154:22 | 154 | fn ensure_amount<'a>(&'a self, ctx: Context) -> Result<Amount, CompilationError>; | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 154 - fn ensure_amount<'a>(&'a self, ctx: Context) -> Result<Amount, CompilationError>; 154 + fn ensure_amount(&self, ctx: Context) -> Result<Amount, CompilationError>; |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L152
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:152:17 | 152 | fn metadata<'a>(&'a self, ctx: Context) -> Result<ObjectMetadata, CompilationError>; | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 152 - fn metadata<'a>(&'a self, ctx: Context) -> Result<ObjectMetadata, CompilationError>; 152 + fn metadata(&self, ctx: Context) -> Result<ObjectMetadata, CompilationError>; |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L150
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:150:22 | 150 | fn get_inner_ref<'a>(&'a self) -> &'a Self::Ref; | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 150 - fn get_inner_ref<'a>(&'a self) -> &'a Self::Ref; 150 + fn get_inner_ref(&self) -> &Self::Ref; |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L148
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:148:19 | 148 | fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<Self::Ref>>]; | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 148 - fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<Self::Ref>>]; 148 + fn finish_fns(&self) -> &[fn() -> Option<actions::Guard<Self::Ref>>]; |
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/mod.rs#L148
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/mod.rs:148:36 | 148 | fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<Self::Ref>>]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L144
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:144:22 | 144 | fn finish_or_fns<'a>( | ^^ 145 | &'a self, | ^^ 146 | ) -> &'a [fn() -> Option<Box<dyn actions::CallableAsFoF<Self::Ref, Self::StatefulArguments>>>]; | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 144 ~ fn finish_or_fns( 145 ~ &self, 146 ~ ) -> &[fn() -> Option<Box<dyn actions::CallableAsFoF<Self::Ref, Self::StatefulArguments>>>]; |
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/mod.rs#L146
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/mod.rs:146:10 | 146 | ) -> &'a [fn() -> Option<Box<dyn actions::CallableAsFoF<Self::Ref, Self::StatefulArguments>>>]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/mod.rs#L137
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/mod.rs:137:10 | 137 | ) -> &'a [fn() -> Option< | __________^ 138 | | actions::ThenFuncAsFinishOrFunc<'a, Self::Ref, Self::StatefulArguments>, 139 | | >] | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L109
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:109:22 | 109 | fn ensure_amount<'a>(&'a self, ctx: Context) -> Result<Amount, CompilationError> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 109 - fn ensure_amount<'a>(&'a self, ctx: Context) -> Result<Amount, CompilationError> { 109 + fn ensure_amount(&self, ctx: Context) -> Result<Amount, CompilationError> { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L105
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:105:17 | 105 | fn metadata<'a>(&'a self, ctx: Context) -> Result<ObjectMetadata, CompilationError> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 105 - fn metadata<'a>(&'a self, ctx: Context) -> Result<ObjectMetadata, CompilationError> { 105 + fn metadata(&self, ctx: Context) -> Result<ObjectMetadata, CompilationError> { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L98
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:98:19 | 98 | fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<S>>] { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 98 - fn finish_fns<'a>(&'a self) -> &'a [fn() -> Option<actions::Guard<S>>] { 98 + fn finish_fns(&self) -> &[fn() -> Option<actions::Guard<S>>] { |
the following explicit lifetimes could be elided: 'a: sapio/src/contract/mod.rs#L93
warning: the following explicit lifetimes could be elided: 'a --> sapio/src/contract/mod.rs:93:22 | 93 | fn finish_or_fns<'a>( | ^^ 94 | &'a self, | ^^ 95 | ) -> &'a [fn() -> Option<Box<dyn actions::CallableAsFoF<S, Self::StatefulArguments>>>] { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 93 ~ fn finish_or_fns( 94 ~ &self, 95 ~ ) -> &[fn() -> Option<Box<dyn actions::CallableAsFoF<S, Self::StatefulArguments>>>] { |
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/mod.rs#L73
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/mod.rs:73:26 | 73 | pub ensure_amount_f: Box<dyn (Fn(&S, Context) -> Result<Amount, CompilationError>)>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/mod.rs#L71
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/mod.rs:71:21 | 71 | pub metadata_f: Box<dyn (Fn(&S, Context) -> Result<ObjectMetadata, CompilationError>)>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/mod.rs#L67
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/mod.rs:67:20 | 67 | pub finish_or: Vec<fn() -> Option<Box<dyn actions::CallableAsFoF<S, T>>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/mod.rs#L65
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/mod.rs:65:15 | 65 | pub then: Vec<fn() -> Option<actions::ThenFuncAsFinishOrFunc<'a, S, T>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
this lifetime isn't used in the function definition: sapio/src/contract/context.rs#L71
warning: this lifetime isn't used in the function definition --> sapio/src/contract/context.rs:71:23 | 71 | pub fn derive_str<'a>(&mut self, path: Arc<String>) -> Result<Self, CompilationError> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
unsafe function's docs miss `# Safety` section: sapio/src/contract/context.rs#L58
warning: unsafe function's docs miss `# Safety` section --> sapio/src/contract/context.rs:58:5 | 58 | pub unsafe fn get_effects_internal(&self) -> &Arc<MapEffectDB> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc = note: `#[warn(clippy::missing_safety_doc)]` on by default
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: sapio/src/contract/compiler/mod.rs#L321
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> sapio/src/contract/compiler/mod.rs:321:24 | 321 | .chain(clause_accumulator.into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `clause_accumulator` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/e51e98dde6a60637b6a71b8105245b629ac3fe77/library/core/src/iter/traits/iterator.rs:524:12 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
usage of `Iterator::fold` on a type that implements `Try`: sapio/src/contract/compiler/mod.rs#L98
warning: usage of `Iterator::fold` on a type that implements `Try` --> sapio/src/contract/compiler/mod.rs:98:10 | 98 | .fold(Ok(def), |a: TxTmplIt, (k, arg)| -> TxTmplIt { | __________^ 99 | | let v = a?; 100 | | let c = applied_effects_ctx 101 | | .derive(PathFragment::Named(SArc(k.clone()))) ... | 104 | | Ok(Box::new(v.chain(w))) 105 | | }) | |__________^ help: use `try_fold` instead: `try_fold(def, |a: TxTmplIt, (k, arg)| ...)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
this lifetime isn't used in the impl: sapio/src/contract/compiler/mod.rs#L47
warning: this lifetime isn't used in the impl --> sapio/src/contract/compiler/mod.rs:47:10 | 47 | impl<'a, C> ImplSeal for C where C: super::AnyContract {} | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
very complex type used. Consider factoring parts into `type` definitions: sapio/src/contract/actions/finish.rs#L30
warning: very complex type used. Consider factoring parts into `type` definitions --> sapio/src/contract/actions/finish.rs:30:19 | 30 | pub simp_gen: Option< | ___________________^ 31 | | fn( 32 | | &ContractSelf, 33 | | Context, ... | 36 | | -> Result<Vec<Box<dyn SIMPAttachableAt<ContinuationPointLT>>>, CompilationError>, 37 | | >, | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
use of `default` to create a unit struct: sapio/src/contract/actions/then.rs#L61
warning: use of `default` to create a unit struct --> sapio/src/contract/actions/then.rs:61:27 | 61 | f: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
usage of `Iterator::fold` on a type that implements `Try`: sapio/src/contract/abi/object/mod.rs#L85
warning: usage of `Iterator::fold` on a type that implements `Try` --> sapio/src/contract/abi/object/mod.rs:85:39 | 85 | v.into_iter().fold( | _______________________________________^ 86 | | Ok(Default::default()), 87 | | |ra: Result<BTreeMap<_, Vec<Value>>, CompilationError>, b| { 88 | | let mut a = ra?; ... | 93 | | }, 94 | | )?, | |_________________________^ help: use `try_fold` instead: `try_fold(Default::default(), |ra: Result<BTreeMap<_, Vec<Value>>, CompilationError>, b| ...)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold = note: `#[warn(clippy::manual_try_fold)]` on by default
field assignment outside of initializer for an instance created with Default::default(): sapio/src/contract/abi/object/bind.rs#L51
warning: field assignment outside of initializer for an instance created with Default::default() --> sapio/src/contract/abi/object/bind.rs:51:9 | 51 | mock_out.vout = 0; | ^^^^^^^^^^^^^^^^^^ | note: consider initializing the variable with `sapio_bitcoin::OutPoint { vout: 0, ..Default::default() }` and removing relevant reassignments --> sapio/src/contract/abi/object/bind.rs:50:9 | 50 | let mut mock_out = OutPoint::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default = note: `#[warn(clippy::field_reassign_with_default)]` on by default
unused import: `SIMP`: sapio/src/template/output.rs#L9
warning: unused import: `SIMP` --> sapio/src/template/output.rs:9:53 | 9 | use sapio_base::simp::{SIMPError, TemplateOutputLT, SIMP}; | ^^^^
unused import: `SIMP`: sapio/src/contract/abi/continuation.rs#L10
warning: unused import: `SIMP` --> sapio/src/contract/abi/continuation.rs:10:53 | 10 | use sapio_base::simp::{SIMPAttachableAt, SIMPError, SIMP}; | ^^^^
use of deprecated method `sapio_bitcoin::Transaction::get_weight`: Please use `transaction::weight` instead.: sapio/src/contract/compiler/mod.rs#L339
warning: use of deprecated method `sapio_bitcoin::Transaction::get_weight`: Please use `transaction::weight` instead. --> sapio/src/contract/compiler/mod.rs:339:32 | 339 | let tx_size = a.tx.get_weight() + estimated_max_size; | ^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default
unused import: `crate::contract::abi::studio::*`: sapio/src/contract/abi/object/mod.rs#L20
warning: unused import: `crate::contract::abi::studio::*` --> sapio/src/contract/abi/object/mod.rs:20:9 | 20 | pub use crate::contract::abi::studio::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
private item shadows public glob re-export: sapio-base/src/effects/mod.rs#L9
warning: private item shadows public glob re-export --> sapio-base/src/effects/mod.rs:9:5 | 9 | use crate::reverse_path::ReversePath; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the name `ReversePath` in the type namespace is supposed to be publicly re-exported here --> sapio-base/src/effects/mod.rs:19:9 | 19 | pub use reverse_path::*; | ^^^^^^^^^^^^^^^ note: but the private item here shadows it --> sapio-base/src/effects/mod.rs:9:5 | 9 | use crate::reverse_path::ReversePath; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(hidden_glob_reexports)]` on by default