Skip to content

Commit 23671a0

Browse files
chore: allow unused variables to be
underscore prefixing fields didn't work because field names are used when serializing, easier to just ignore unused for the whole struct Signed-off-by: Kristian Wahlroos <kristian.whl@gmail.com>
1 parent fe55666 commit 23671a0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

crates/ilp-cli/src/interpreter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ fn unflatten_pairs<'a>(matches: &'a ArgMatches) -> (&'a str, HashMap<&'a str, &'
390390
(matches.value_of("authorization_key").unwrap(), pairs)
391391
}
392392

393+
#[allow(unused)]
393394
#[derive(Debug, serde::Deserialize)]
394395
struct XpringResponse {
395396
http_endpoint: String,

crates/interledger-http/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ mod tests {
8989
use serde::Deserialize;
9090
use warp::test::request;
9191

92+
#[allow(unused)]
9293
#[derive(Deserialize, Clone)]
9394
struct TestJsonStruct {
9495
string_value: String,

crates/interledger-service/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ mod tests {
455455

456456
#[derive(Clone)]
457457
struct LayeredService<I, A> {
458-
next: I,
458+
_next: I,
459459
account_type: PhantomData<A>,
460460
}
461461

@@ -464,9 +464,9 @@ mod tests {
464464
I: IncomingService<A> + Send + Sync + 'static,
465465
A: Account,
466466
{
467-
fn new_incoming(next: I) -> Self {
467+
fn new_incoming(_next: I) -> Self {
468468
Self {
469-
next,
469+
_next,
470470
account_type: PhantomData,
471471
}
472472
}
@@ -477,9 +477,9 @@ mod tests {
477477
I: OutgoingService<A> + Send + Sync + 'static,
478478
A: Account,
479479
{
480-
fn new_outgoing(next: I) -> Self {
480+
fn new_outgoing(_next: I) -> Self {
481481
Self {
482-
next,
482+
_next,
483483
account_type: PhantomData,
484484
}
485485
}

0 commit comments

Comments
 (0)