Skip to content

Commit ecdb768

Browse files
committed
revert
1 parent 860e5a8 commit ecdb768

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

contracts/utils/Bytes.sol

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,6 @@ library Bytes {
9999
return result;
100100
}
101101

102-
/**
103-
* @dev Returns true if the two byte buffers are equal.
104-
*/
105-
function equal(bytes memory a, bytes memory b) internal pure returns (bool) {
106-
return a.length == b.length && keccak256(a) == keccak256(b);
107-
}
108-
109102
/**
110103
* @dev Reads a bytes32 from a bytes array without bounds checking.
111104
*

contracts/utils/Strings.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pragma solidity ^0.8.20;
66
import {Math} from "./math/Math.sol";
77
import {SafeCast} from "./math/SafeCast.sol";
88
import {SignedMath} from "./math/SignedMath.sol";
9-
import {Bytes} from "./Bytes.sol";
109

1110
/**
1211
* @dev String operations.
@@ -133,7 +132,7 @@ library Strings {
133132
* @dev Returns true if the two strings are equal.
134133
*/
135134
function equal(string memory a, string memory b) internal pure returns (bool) {
136-
return Bytes.equal(bytes(a), bytes(b));
135+
return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
137136
}
138137

139138
/**

test/utils/Bytes.t.sol

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)