Skip to content

Commit

Permalink
Fix compiling warning for rustc 1.81
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Dec 15, 2024
1 parent 4e42c80 commit acbad4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/fiber/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ where
"Signing commitment transactions while shutdown is pending, current state {:?}",
&state.state
);
CommitmentSignedFlags::PendingShutdown(flags)
CommitmentSignedFlags::PendingShutdown()
} else {
return Err(ProcessingChannelError::InvalidState(format!(
"Unable to process commitment_signed message in shutdowning state with flags {:?}",
Expand Down Expand Up @@ -1173,7 +1173,7 @@ where
state.maybe_transition_to_tx_signatures(flags, &self.network)?;
}
CommitmentSignedFlags::ChannelReady() => {}
CommitmentSignedFlags::PendingShutdown(_) => {
CommitmentSignedFlags::PendingShutdown() => {
state.maybe_transition_to_shutdown(&self.network)?;
}
}
Expand Down Expand Up @@ -3072,7 +3072,7 @@ bitflags! {
#[derive(Debug)]
enum CommitmentSignedFlags {
SigningCommitment(SigningCommitmentFlags),
PendingShutdown(ShuttingDownFlags),
PendingShutdown(),
ChannelReady(),
}

Expand Down Expand Up @@ -5192,7 +5192,7 @@ impl ChannelActorState {
"Signing commitment transactions while shutdown is pending, current state {:?}",
&self.state
);
CommitmentSignedFlags::PendingShutdown(flags)
CommitmentSignedFlags::PendingShutdown()
} else {
return Err(ProcessingChannelError::InvalidState(format!(
"Unable to process commitment_signed message in shutdowning state with flags {:?}",
Expand Down Expand Up @@ -5246,11 +5246,11 @@ impl ChannelActorState {
self.update_state(ChannelState::SigningCommitment(flags));
self.maybe_transition_to_tx_signatures(flags, network)?;
}
CommitmentSignedFlags::ChannelReady() | CommitmentSignedFlags::PendingShutdown(_) => {
CommitmentSignedFlags::ChannelReady() | CommitmentSignedFlags::PendingShutdown() => {
self.send_revoke_and_ack_message(network);
match flags {
CommitmentSignedFlags::ChannelReady() => {}
CommitmentSignedFlags::PendingShutdown(_) => {
CommitmentSignedFlags::PendingShutdown() => {
// TODO: Handle error in the below function call.
// We've already updated our state, we should never fail here.
self.maybe_transition_to_shutdown(network)?;
Expand Down
4 changes: 2 additions & 2 deletions src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use tokio::sync::{mpsc::Sender, RwLock};
pub type InvoiceCommandWithReply = (InvoiceCommand, Sender<crate::Result<String>>);

fn build_server(addr: &str) -> Server {
#[cfg(not(release))]
#[cfg(debug_assertions)]
{
// Use socket2 to set reuse address and reuse port,
// so that we can restart the server without waiting for the port to be released.
Expand All @@ -56,7 +56,7 @@ fn build_server(addr: &str) -> Server {
.build_from_tcp(socket)
.expect("JsonRPC server built from TCP")
}
#[cfg(release)]
#[cfg(not(debug_assertions))]
{
Server::builder()
.build(addr)
Expand Down

0 comments on commit acbad4b

Please sign in to comment.