Skip to content

Commit

Permalink
misc: Renames Self() error to ActionOnSelf() to prevent clashing with…
Browse files Browse the repository at this point in the history
… Rust reserved keyword
  • Loading branch information
vicnaum committed Jan 18, 2025
1 parent f0128a6 commit d93a72f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/core/primitives/graph/GraphCore.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library GraphCore {
{
require(followerAccount != address(0), Errors.InvalidParameter());
require(accountToFollow != address(0), Errors.InvalidParameter());
require(followerAccount != accountToFollow, Errors.Self());
require(followerAccount != accountToFollow, Errors.ActionOnSelf());
require($storage().follows[followerAccount][accountToFollow].id == 0, Errors.CannotFollowAgain());
if (followId == 0) {
followId = ++$storage().lastFollowIdAssigned[accountToFollow];
Expand Down
2 changes: 1 addition & 1 deletion contracts/core/types/Errors.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ library Errors {
error RequiredRuleReverted();
error RuleNotConfigured();
error SelectorEnabledForDifferentRuleType();
error Self();
error ActionOnSelf();
error SingleAnyOfRule();
error UnexpectedContractImpl();
error UnsupportedSelector();
Expand Down
2 changes: 1 addition & 1 deletion contracts/migration/MigrationGraph.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contract MigrationGraph is Graph {
function _followWithoutChecks(address followerAccount, address accountToFollow, uint256 followId, uint256 timestamp)
internal
{
require(followerAccount != accountToFollow, Errors.Self());
require(followerAccount != accountToFollow, Errors.ActionOnSelf());
require(followId != 0, Errors.InvalidParameter());
require(followerAccount != address(0), Errors.InvalidParameter());
require(accountToFollow != address(0), Errors.InvalidParameter());
Expand Down
2 changes: 1 addition & 1 deletion contracts/rules/base/AccountBlockingRule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract AccountBlockingRule is IFeedRule, IGraphRule, MetadataBased {

function blockUser(address source, address target) external {
require(msg.sender == source, Errors.InvalidMsgSender());
require(source != target, Errors.Self());
require(source != target, Errors.ActionOnSelf());
accountBlocks[source][target] = block.timestamp;
}

Expand Down

0 comments on commit d93a72f

Please sign in to comment.