Skip to content

Commit bbb7541

Browse files
committed
f: Handle Fixups
1. std::marker::PhantomData -> core::marker::PhantomData 2. self.path.clone() -> self.path 3. tabs not spaces in `self.messenger.handle_onion_message_response(`
1 parent 8526afc commit bbb7541

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/onion_message/messenger.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,19 +250,19 @@ pub struct Responder<'a, OMH: OnionMessageHandler, T: OnionMessageContents> {
250250
pub path_id: Option<[u8; 32]>,
251251
// This phantom Data is used to ensure that we use T in the struct definition
252252
// This allow us to ensure at compile time that the received message type and response type will be same
253-
_phantom: std::marker::PhantomData<T>
253+
_phantom: core::marker::PhantomData<T>
254254
}
255255

256256
impl<'a, OMH: OnionMessageHandler, T: OnionMessageContents> Responder<'a, OMH, T> {
257257
pub fn respond(&self, response: T) {
258258
// Utilising the fact that we ensure at compile time that
259259
// received message type, and response type will be same
260260
let message_type = T::msg_type(&response);
261-
self.messenger.handle_onion_message_response(
261+
self.messenger.handle_onion_message_response(
262262
response, self.reply_path.clone(), format_args!(
263263
"when responding to {} onion message with path_id {:02x?}",
264264
message_type,
265-
self.path_id.clone()
265+
self.path_id
266266
)
267267
);
268268
}

0 commit comments

Comments
 (0)