Merge pull request #11648 from CrimsonGlory/patch-1

minor doc change. RHS->right hand side
This commit is contained in:
Harikrishnan Mulackal 2021-07-13 09:04:24 +02:00 committed by GitHub
commit dda362f084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -559,7 +559,7 @@ shown in the following example:
function newCampaign(address payable beneficiary, uint goal) public returns (uint campaignID) { function newCampaign(address payable beneficiary, uint goal) public returns (uint campaignID) {
campaignID = numCampaigns++; // campaignID is return variable campaignID = numCampaigns++; // campaignID is return variable
// We cannot use "campaigns[campaignID] = Campaign(beneficiary, goal, 0, 0)" // We cannot use "campaigns[campaignID] = Campaign(beneficiary, goal, 0, 0)"
// because the RHS creates a memory-struct "Campaign" that contains a mapping. // because the right hand side creates a memory-struct "Campaign" that contains a mapping.
Campaign storage c = campaigns[campaignID]; Campaign storage c = campaigns[campaignID];
c.beneficiary = beneficiary; c.beneficiary = beneficiary;
c.fundingGoal = goal; c.fundingGoal = goal;