title: Equivalent for abi.encodePacked
body: <p>I am using ethers-rs to write a defi app. I need to calculate the CREATE2 address in rust. I couldn't find the equivalent of <code>abi.encodePacked(token0, token1)</code> in rust.</p>
  <p>The code used in Uniswap's library (<a href="https://vomtom.at/how-to-use-uniswap-v2-as-a-developer" rel="nofollow noreferrer">https://vomtom.at/how-to-use-uniswap-v2-as-a-developer</a>):</p>
  <pre><code>    // calculates the CREATE2 address for a pair without making any external calls
      function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
          (address token0, address token1) = sortTokens(tokenA, tokenB);
          pair = address(uint(keccak256(abi.encodePacked(
                  hex'ff',
                  factory,
                  keccak256(abi.encodePacked(token0, token1)),
                  hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash
              ))));
      }
  </code></pre>
  <p>Unfortunately I didn't get much help from the internet.</p>
  <p>What's the equivalent for abi.encodePacked in rust.</p>
  <p>Regards.</p>