git.delta.rocks / unique-network / refs/commits / cb67b4ebad79

difftreelog

CORE-317 cargo fmt

Trubnikov Sergey2022-04-11parent: #0902e70.patch.diff
in: master

2 files changed

modifiedcrates/evm-coder/src/abi.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/abi.rs
+++ b/crates/evm-coder/src/abi.rs
@@ -63,21 +63,23 @@
 		))
 	}
 
-	fn read_pad<const S: usize>(buf: &[u8], offset: usize, pad_start: usize, pad_size: usize, block_start: usize, block_size: usize) -> Result<[u8; S]> {
+	fn read_pad<const S: usize>(
+		buf: &[u8],
+		offset: usize,
+		pad_start: usize,
+		pad_size: usize,
+		block_start: usize,
+		block_size: usize,
+	) -> Result<[u8; S]> {
 		if buf.len() - offset < ABI_ALIGNMENT {
 			return Err(Error::Error(ExitError::OutOfOffset));
 		}
 		let mut block = [0; S];
 		// Verify padding is empty
-		if !buf[pad_start..pad_size]
-			.iter()
-			.all(|&v| v == 0)
-		{
+		if !buf[pad_start..pad_size].iter().all(|&v| v == 0) {
 			return Err(Error::Error(ExitError::InvalidRange));
 		}
-		block.copy_from_slice(
-			&buf[block_start..block_size],
-		);
+		block.copy_from_slice(&buf[block_start..block_size]);
 		Ok(block)
 	}
 
@@ -87,10 +89,10 @@
 		Self::read_pad(
 			self.buf,
 			offset,
-			offset, 
+			offset,
 			offset + ABI_ALIGNMENT - S,
 			offset + ABI_ALIGNMENT - S,
-			offset + ABI_ALIGNMENT
+			offset + ABI_ALIGNMENT,
 		)
 	}
 
@@ -100,13 +102,13 @@
 		Self::read_pad(
 			self.buf,
 			offset,
-			offset + S, 
+			offset + S,
 			offset + ABI_ALIGNMENT,
 			offset,
-			offset + S
+			offset + S,
 		)
 	}
-	
+
 	pub fn address(&mut self) -> Result<H160> {
 		Ok(H160(self.read_padleft()?))
 	}
modifiedcrates/evm-coder/src/solidity.rsdiffbeforeafterboth

no syntactic changes