Skip to content

Commit 09e5f5c

Browse files
committed
Update to Rust 1.91
1 parent 8f639f2 commit 09e5f5c

File tree

15 files changed

+16
-12
lines changed

15 files changed

+16
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235

236236
- uses: actions-rs/toolchain@v1
237237
with:
238-
toolchain: nightly-2025-03-28
238+
toolchain: nightly-2025-11-10
239239
override: true
240240

241241
- name: install deps

bindings/ergo-lib-wasm/src/ast/js_conv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub(crate) fn constant_from_js(val: &JsValue) -> Result<Constant, ConvError> {
7676
} else if let Ok(coll_longs) = coll_long_from_js(&arr) {
7777
Ok(coll_longs)
7878
} else {
79-
return Err(ConvError::NotSupported(val.clone()));
79+
Err(ConvError::NotSupported(val.clone()))
8080
}
8181
} else {
8282
// regular array

ergo-lib/src/chain/transaction/ergo_transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub trait ErgoTransaction: ContextExtensionProvider {
8989
fn outputs(&self) -> &[ErgoBox];
9090

9191
/// Stateless transaction validation (no blockchain context) for a transaction
92-
/// Returns [`Ok(())`] if validation has succeeded or returns [`TxValidationError`]
92+
/// Returns [Ok(())] if validation has succeeded or returns [`TxValidationError`]
9393
fn validate_stateless(&self) -> Result<(), TxValidationError> {
9494
// Note that we don't need to check if inputs/data inputs/outputs are >= 1 <= 32767 here since BoundedVec takes care of that
9595
let inputs = self.inputs_ids();

ergo-p2p/src/codec.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use crate::message::Request;
66

77
/// Encoder/Decoder for network messages from/to bytes
88
#[derive(Default)]
9+
#[allow(dead_code)]
910
pub struct Codec {}
1011

1112
impl Encoder<Request> for Codec {

ergo-p2p/src/constants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::time::Duration;
22

33
/// The timeout for handshakes when connecting to new peers.
4+
#[allow(dead_code)]
45
pub const HANDSHAKE_TIMEOUT: Duration = Duration::from_secs(4);

ergo-p2p/src/peer_connection_handler.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use crate::PeerInfo;
2626

2727
/// A service that handshakes with a remote peer and constructs a client/server pair.
2828
#[derive(Clone)]
29+
#[allow(dead_code)]
2930
pub struct PeerConnectionHandler {}
3031

3132
impl Service<HandshakeRequest> for PeerConnectionHandler {
@@ -89,6 +90,7 @@ pub struct ConnectionId {
8990
direction: ConnectionDirection,
9091
}
9192
impl ConnectionId {
93+
#[allow(dead_code)]
9294
pub(crate) fn new_outbound_direct(_addr: PeerAddr) -> Self {
9395
todo!()
9496
}

ergo-p2p/src/peer_connector.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ use crate::peer_connection_handler::PeerConnectionHandler;
1818
use crate::Client;
1919

2020
/// Opens a TCP connection before forwarding to the inner peer connection handling service for a handshake.
21+
#[allow(dead_code)]
2122
pub struct PeerConnector {
2223
handshaker: PeerConnectionHandler,
2324
}
2425

2526
/// A connector request.
2627
/// Contains the information needed to make an outbound connection to the peer.
28+
#[allow(dead_code)]
2729
pub struct OutboundConnectorRequest {
2830
/// The listener address of the peer.
2931
pub addr: PeerAddr,

ergoscript-compiler/src/parser/source.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl<'t, 'input> Source<'t, 'input> {
2727
self.peek_kind_raw()
2828
}
2929

30-
pub fn peek_token(&mut self) -> Option<&Token> {
30+
pub fn peek_token(&mut self) -> Option<&Token<'_>> {
3131
self.eat_trivia();
3232
self.peek_token_raw()
3333
}
@@ -50,7 +50,7 @@ impl<'t, 'input> Source<'t, 'input> {
5050
self.peek_token_raw().map(|Token { kind, .. }| *kind)
5151
}
5252

53-
fn peek_token_raw(&self) -> Option<&Token> {
53+
fn peek_token_raw(&self) -> Option<&Token<'_>> {
5454
self.tokens.get(self.cursor)
5555
}
5656
}

ergotree-interpreter/src/sigma_protocol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ mod tests {
120120
assert!(SOUNDNESS_BITS < GROUP_SIZE_BITS);
121121
// blake2b hash function requirements
122122
assert!(SOUNDNESS_BYTES * 8 <= 512);
123-
assert!(SOUNDNESS_BYTES % 8 == 0);
123+
assert!(SOUNDNESS_BYTES.is_multiple_of(8));
124124
}
125125
}

ergotree-interpreter/src/sigma_protocol/proof_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl ProofTree {
4444
}
4545
}
4646

47-
pub(crate) fn as_tree_kind(&self) -> ProofTreeKind {
47+
pub(crate) fn as_tree_kind(&self) -> ProofTreeKind<'_> {
4848
match self {
4949
ProofTree::UncheckedTree(unch) => unch.as_tree_kind(),
5050
ProofTree::UnprovenTree(unp) => unp.as_tree_kind(),

0 commit comments

Comments
 (0)