File tree Expand file tree Collapse file tree 3 files changed +1
-21
lines changed Expand file tree Collapse file tree 3 files changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -99,13 +99,6 @@ library Bytes {
99
99
return result;
100
100
}
101
101
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
-
109
102
/**
110
103
* @dev Reads a bytes32 from a bytes array without bounds checking.
111
104
*
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ pragma solidity ^0.8.20;
6
6
import {Math} from "./math/Math.sol " ;
7
7
import {SafeCast} from "./math/SafeCast.sol " ;
8
8
import {SignedMath} from "./math/SignedMath.sol " ;
9
- import {Bytes} from "./Bytes.sol " ;
10
9
11
10
/**
12
11
* @dev String operations.
@@ -133,7 +132,7 @@ library Strings {
133
132
* @dev Returns true if the two strings are equal.
134
133
*/
135
134
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));
137
136
}
138
137
139
138
/**
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments