Skip to content

Commit e79d2ce

Browse files
committed
Fix rustc nightly compiler error.
This works around a regression in nightly rustc that prevents type inference from working properly.
1 parent a9a09d0 commit e79d2ce

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lightning/src/ln/router.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ mod tests {
15641564
assert_eq!(route.paths[0][0].fee_msat, 200);
15651565
assert_eq!(route.paths[0][0].cltv_expiry_delta, (13 << 8) | 1);
15661566
assert_eq!(route.paths[0][0].node_features.le_flags(), &vec![0b11]); // it should also override our view of their features
1567-
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::new()); // No feature flags will meet the relevant-to-channel conversion
1567+
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::<u8>::new()); // No feature flags will meet the relevant-to-channel conversion
15681568

15691569
assert_eq!(route.paths[0][1].pubkey, node3);
15701570
assert_eq!(route.paths[0][1].short_channel_id, 13);
@@ -1613,7 +1613,7 @@ mod tests {
16131613
assert_eq!(route.paths[0][0].fee_msat, 200);
16141614
assert_eq!(route.paths[0][0].cltv_expiry_delta, (13 << 8) | 1);
16151615
assert_eq!(route.paths[0][0].node_features.le_flags(), &vec![0b11]); // it should also override our view of their features
1616-
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::new()); // No feature flags will meet the relevant-to-channel conversion
1616+
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::<u8>::new()); // No feature flags will meet the relevant-to-channel conversion
16171617

16181618
assert_eq!(route.paths[0][1].pubkey, node3);
16191619
assert_eq!(route.paths[0][1].short_channel_id, 13);
@@ -1680,7 +1680,7 @@ mod tests {
16801680
assert_eq!(route.paths[0][0].fee_msat, 200);
16811681
assert_eq!(route.paths[0][0].cltv_expiry_delta, (13 << 8) | 1);
16821682
assert_eq!(route.paths[0][0].node_features.le_flags(), &vec![0b11]);
1683-
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::new()); // No feature flags will meet the relevant-to-channel conversion
1683+
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::<u8>::new()); // No feature flags will meet the relevant-to-channel conversion
16841684

16851685
assert_eq!(route.paths[0][1].pubkey, node3);
16861686
assert_eq!(route.paths[0][1].short_channel_id, 13);
@@ -1751,8 +1751,8 @@ mod tests {
17511751
assert_eq!(route.paths[0][4].short_channel_id, 8);
17521752
assert_eq!(route.paths[0][4].fee_msat, 100);
17531753
assert_eq!(route.paths[0][4].cltv_expiry_delta, 42);
1754-
assert_eq!(route.paths[0][4].node_features.le_flags(), &Vec::new()); // We dont pass flags in from invoices yet
1755-
assert_eq!(route.paths[0][4].channel_features.le_flags(), &Vec::new()); // We can't learn any flags from invoices, sadly
1754+
assert_eq!(route.paths[0][4].node_features.le_flags(), &Vec::<u8>::new()); // We dont pass flags in from invoices yet
1755+
assert_eq!(route.paths[0][4].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly
17561756
}
17571757

17581758
{ // Simple test with outbound channel to 4 to test that last_hops and first_hops connect
@@ -1775,14 +1775,14 @@ mod tests {
17751775
assert_eq!(route.paths[0][0].fee_msat, 0);
17761776
assert_eq!(route.paths[0][0].cltv_expiry_delta, (8 << 8) | 1);
17771777
assert_eq!(route.paths[0][0].node_features.le_flags(), &vec![0b11]);
1778-
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::new()); // No feature flags will meet the relevant-to-channel conversion
1778+
assert_eq!(route.paths[0][0].channel_features.le_flags(), &Vec::<u8>::new()); // No feature flags will meet the relevant-to-channel conversion
17791779

17801780
assert_eq!(route.paths[0][1].pubkey, node7);
17811781
assert_eq!(route.paths[0][1].short_channel_id, 8);
17821782
assert_eq!(route.paths[0][1].fee_msat, 100);
17831783
assert_eq!(route.paths[0][1].cltv_expiry_delta, 42);
1784-
assert_eq!(route.paths[0][1].node_features.le_flags(), &Vec::new()); // We dont pass flags in from invoices yet
1785-
assert_eq!(route.paths[0][1].channel_features.le_flags(), &Vec::new()); // We can't learn any flags from invoices, sadly
1784+
assert_eq!(route.paths[0][1].node_features.le_flags(), &Vec::<u8>::new()); // We dont pass flags in from invoices yet
1785+
assert_eq!(route.paths[0][1].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly
17861786
}
17871787

17881788
last_hops[0].fee_base_msat = 1000;
@@ -1818,8 +1818,8 @@ mod tests {
18181818
assert_eq!(route.paths[0][3].short_channel_id, 10);
18191819
assert_eq!(route.paths[0][3].fee_msat, 100);
18201820
assert_eq!(route.paths[0][3].cltv_expiry_delta, 42);
1821-
assert_eq!(route.paths[0][3].node_features.le_flags(), &Vec::new()); // We dont pass flags in from invoices yet
1822-
assert_eq!(route.paths[0][3].channel_features.le_flags(), &Vec::new()); // We can't learn any flags from invoices, sadly
1821+
assert_eq!(route.paths[0][3].node_features.le_flags(), &Vec::<u8>::new()); // We dont pass flags in from invoices yet
1822+
assert_eq!(route.paths[0][3].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly
18231823
}
18241824

18251825
{ // ...but still use 8 for larger payments as 6 has a variable feerate
@@ -1860,8 +1860,8 @@ mod tests {
18601860
assert_eq!(route.paths[0][4].short_channel_id, 8);
18611861
assert_eq!(route.paths[0][4].fee_msat, 2000);
18621862
assert_eq!(route.paths[0][4].cltv_expiry_delta, 42);
1863-
assert_eq!(route.paths[0][4].node_features.le_flags(), &Vec::new()); // We dont pass flags in from invoices yet
1864-
assert_eq!(route.paths[0][4].channel_features.le_flags(), &Vec::new()); // We can't learn any flags from invoices, sadly
1863+
assert_eq!(route.paths[0][4].node_features.le_flags(), &Vec::<u8>::new()); // We dont pass flags in from invoices yet
1864+
assert_eq!(route.paths[0][4].channel_features.le_flags(), &Vec::<u8>::new()); // We can't learn any flags from invoices, sadly
18651865
}
18661866

18671867
{ // Test Router serialization/deserialization

0 commit comments

Comments
 (0)