Skip to content

Commit

Permalink
Fix rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Apr 10, 2021
1 parent 43e6c65 commit 8f4417f
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions tests/ui/panic_in_result_fn_debug_assertions.rs
Expand Up @@ -6,41 +6,34 @@
struct A;

impl A {
fn result_with_debug_assert_with_message(x: i32) -> Result<bool, String>
{
fn result_with_debug_assert_with_message(x: i32) -> Result<bool, String> {
debug_assert!(x == 5, "wrong argument");
Ok(true)
}

fn result_with_debug_assert_eq(x: i32) -> Result<bool, String>
{
fn result_with_debug_assert_eq(x: i32) -> Result<bool, String> {
debug_assert_eq!(x, 5);
Ok(true)
}

fn result_with_debug_assert_ne(x: i32) -> Result<bool, String>
{
fn result_with_debug_assert_ne(x: i32) -> Result<bool, String> {
debug_assert_ne!(x, 1);
Ok(true)
}

fn other_with_debug_assert_with_message(x: i32)
{
fn other_with_debug_assert_with_message(x: i32) {
debug_assert!(x == 5, "wrong argument");
}

fn other_with_debug_assert_eq(x: i32)
{
fn other_with_debug_assert_eq(x: i32) {
debug_assert_eq!(x, 5);
}

fn other_with_debug_assert_ne(x: i32)
{
fn other_with_debug_assert_ne(x: i32) {
debug_assert_ne!(x, 1);
}

fn result_without_banned_functions() -> Result<bool, String>
{
fn result_without_banned_functions() -> Result<bool, String> {
let debug_assert = "debug_assert!";
println!("No {}", debug_assert);
Ok(true)
Expand Down

0 comments on commit 8f4417f

Please sign in to comment.