Skip to content

Commit

Permalink
chore: minor lint rust code adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
hensg committed Sep 25, 2024
1 parent 0051f02 commit d31668c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions fedimint-nwc/src/database/invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@ impl From<&Bolt11Invoice> for Invoice {
}

impl Value for Invoice {
type SelfType<'a> = Self where Self: 'a;
type AsBytes<'a> = Vec<u8> where Self: 'a;
type SelfType<'a>
= Self
where
Self: 'a;
type AsBytes<'a>
= Vec<u8>
where
Self: 'a;

fn as_bytes<'a, 'b: 'a>(value: &'a Self::SelfType<'b>) -> Vec<u8> {
// nosemgrep: use-of-unwrap
Expand Down
10 changes: 8 additions & 2 deletions fedimint-nwc/src/database/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ impl Payment {
}

impl Value for Payment {
type SelfType<'a> = Self where Self: 'a;
type AsBytes<'a> = Vec<u8> where Self: 'a;
type SelfType<'a>
= Self
where
Self: 'a;
type AsBytes<'a>
= Vec<u8>
where
Self: 'a;

fn as_bytes<'a, 'b: 'a>(value: &'a Self::SelfType<'b>) -> Vec<u8> {
// nosemgrep: use-of-unwrap
Expand Down
2 changes: 1 addition & 1 deletion fedimint-nwc/src/services/nostr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl NostrService {
.map(|line| line.to_string())
.collect::<Vec<_>>();

let client = Client::new(&Keys::new(server_key.into()));
let client = Client::new(Keys::new(server_key.into()));
let service = Self {
client,
server_key,
Expand Down

0 comments on commit d31668c

Please sign in to comment.