From 1e17ef8a3efbf7099bdeb29c8bd48fdeb51c4e2f Mon Sep 17 00:00:00 2001 From: Facundo Lerena Date: Thu, 30 Nov 2023 15:17:06 -0300 Subject: [PATCH] cargo fmt --- .../core-mem-forget-1/remediated-example/src/lib.rs | 9 +-------- .../core-mem-forget-1/vulnerable-example/src/lib.rs | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/test-cases/core-mem-forget/core-mem-forget-1/remediated-example/src/lib.rs b/test-cases/core-mem-forget/core-mem-forget-1/remediated-example/src/lib.rs index 949fbad6..a7cf9ad0 100644 --- a/test-cases/core-mem-forget/core-mem-forget-1/remediated-example/src/lib.rs +++ b/test-cases/core-mem-forget/core-mem-forget-1/remediated-example/src/lib.rs @@ -4,7 +4,6 @@ use soroban_sdk::{contract, contractimpl, contracttype}; #[contract] pub struct CoreMemForget; - #[contracttype] #[derive(Eq, PartialEq)] pub struct WithoutCopy { @@ -20,8 +19,6 @@ impl CoreMemForget { } } - - #[cfg(test)] mod tests { use crate::*; @@ -29,14 +26,10 @@ mod tests { #[test] fn test_forget_something() { // Given - let test_value: WithoutCopy = WithoutCopy { - a: 80, - b: 60, - }; + let test_value: WithoutCopy = WithoutCopy { a: 80, b: 60 }; let result = CoreMemForget::forget_something(test_value); assert_eq!(result, 0); } - } diff --git a/test-cases/core-mem-forget/core-mem-forget-1/vulnerable-example/src/lib.rs b/test-cases/core-mem-forget/core-mem-forget-1/vulnerable-example/src/lib.rs index 0608d7d1..93f36254 100644 --- a/test-cases/core-mem-forget/core-mem-forget-1/vulnerable-example/src/lib.rs +++ b/test-cases/core-mem-forget/core-mem-forget-1/vulnerable-example/src/lib.rs @@ -4,7 +4,6 @@ use soroban_sdk::{contract, contractimpl, contracttype}; #[contract] pub struct CoreMemForget; - #[contracttype] #[derive(Eq, PartialEq)] pub struct WithoutCopy { @@ -20,8 +19,6 @@ impl CoreMemForget { } } - - #[cfg(test)] mod tests { use crate::*; @@ -29,14 +26,10 @@ mod tests { #[test] fn test_forget_something() { // Given - let test_value: WithoutCopy = WithoutCopy { - a: 80, - b: 60, - }; + let test_value: WithoutCopy = WithoutCopy { a: 80, b: 60 }; let result = CoreMemForget::forget_something(test_value); assert_eq!(result, 0); } - }