```\n        /// @notice Internal call to mint a Hat token to a wearer\n        /// @dev Unsafe if called when `_wearer` has a non-zero balance of `_hatId`\n        /// @param _wearer The wearer of the Hat and the recipient of the  newly minted token\n        /// @param _hatId The id of the Hat to mint\n        function _mintHat(address _wearer, uint256 _hatId) internal {\n            unchecked {\n        // should not overflow since `mintHat` enforces max balance of 1\n            _balanceOf[_wearer][_hatId] = 1;\n        // increment Hat supply counter\n        // should not overflow given AllHatsWorn check in `mintHat` ++_hats[_hatId].supply;\n        }\n        emit TransferSingle(msg.sender, address(0), _wearer, _hatId, 1);\n        }\n```\n