Skip to content

Commit

Permalink
Format the codebase according to new rustfmt config.
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinewallace committed Dec 19, 2019
1 parent a76a61d commit 78acc22
Show file tree
Hide file tree
Showing 78 changed files with 30,817 additions and 9,789 deletions.
9 changes: 6 additions & 3 deletions fuzz/src/bin/chanmon_consistency_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::chanmon_consistency::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
chanmon_consistency_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/chanmon_deser_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::chanmon_deser::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
chanmon_deser_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/full_stack_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::full_stack::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
full_stack_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_accept_channel_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_accept_channel::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_accept_channel_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_announcement_signatures_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_announcement_signatures::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_announcement_signatures_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_channel_announcement_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_channel_announcement::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_channel_announcement_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_channel_reestablish_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_channel_reestablish::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_channel_reestablish_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_channel_update_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_channel_update::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_channel_update_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_closing_signed_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_closing_signed::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_closing_signed_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_commitment_signed_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_commitment_signed::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_commitment_signed_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_decoded_onion_error_packet_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_decoded_onion_error_packet::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_decoded_onion_error_packet_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_error_message_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_error_message::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_error_message_run(data.as_ptr(), data.len());
Expand Down
9 changes: 6 additions & 3 deletions fuzz/src/bin/msg_funding_created_target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use lightning_fuzz::msg_targets::msg_funding_created::*;
use std::io::Read;

#[cfg(feature = "afl")]
#[macro_use] extern crate afl;
#[macro_use]
extern crate afl;
#[cfg(feature = "afl")]
fn main() {
fuzz!(|data| {
Expand All @@ -19,7 +20,8 @@ fn main() {
}

#[cfg(feature = "honggfuzz")]
#[macro_use] extern crate honggfuzz;
#[macro_use]
extern crate honggfuzz;
#[cfg(feature = "honggfuzz")]
fn main() {
loop {
Expand All @@ -30,7 +32,8 @@ fn main() {
}

#[cfg(feature = "libfuzzer_fuzz")]
#[macro_use] extern crate libfuzzer_sys;
#[macro_use]
extern crate libfuzzer_sys;
#[cfg(feature = "libfuzzer_fuzz")]
fuzz_target!(|data: &[u8]| {
msg_funding_created_run(data.as_ptr(), data.len());
Expand Down
Loading

0 comments on commit 78acc22

Please sign in to comment.