On the 14th day of November, 1881, Sumner and wife conveyed to the railway company a strip of ground sixty-six feet in width, for a right of way over two adjoining tracts of land which the former owned.
The deed contained a recital that it was made upon the consideration that $200 was paid, and upon the further con-, sideration that the grantee covenanted “ to make a stock-pass under said road, and a farm crossing over it, and to fence said strip, and, further, to locate and maintain a depot at the line between the above tracts.”
On the 17th day of January, 1885, Sumner brought this suit to recover damages for alleged breaches of the covenants above recited. The breaches assigned are, (1) that the railway company wholly failed and refused to establish and *57maintain a depot at the place designated, and (2) that it failed and refused to erect and maintain fences, whereby the plaintiff had sustained damages in various ways specified.
At the trial the court permitted the plaintiff to prove as an element of damage, that two of his hogs had been killed by the cars, the animals having gone upon the track by reason of the defendant’s failure to fence its right of way over plaintiff’s land.
Evidence was admitted to show that animals had gone upon and trespassed on the plaintiff’s land, and that the neglect of the company to build the fence had deprived him of the pasturage upon lands adjacent to the right of way. Evidence was also admitted to show that the plaintiff’s farm was worth less than it otherwise would have been because of the failure to erect and maintain a depot at the point designated in the deed.
A general verdict for the plaintiff was returned, assessing damages at $955. By answers to special interrogatories, the jury returned the following items of damages:
1. The cost of erecting the fence.........$250
2. Damages for failure to erect fence, embracing the following items: Hogs killed, $25; loss of pasture, three years, $50 per year, $150; trespassing animals, $30. Total......■......205
3. Failure to erect and maintain depot.......500
Total..................$955
The record presents several questions involving the correctness of the ruling of the court upon the subject of the measure of damages. It is also contended that the stipulation in the deed, by which the defendant agreed to erect and maintain a depot,- is void as against public policy.
The appellant contends that the measure of damages for failing to erect the fence was the amount it cost to erect it, and that in permitting the jury to hear and consider evidence of the value of hogs killed, the value of the use of pasture *58lands, and of the damage done to his lands by trespassing animals, the court committed error.
The argument is, that upon discovering the appellant’s failure to erect fences within a reasonable time, it became the plaintiff’s duty to erect them, and by that means prevent the damages from being enhanced.
While it is true, where one has suffered, or is about to suffer, injury from another’s breach of contract, the law imposes the duty of making reasonable exertions to render the injury as light as possible, it is also true that he whose duty it is primarily to fulfil a contract, may be depended upon to discharge an obligation, the violation of which he knows will result in damages to another.
It is no answer for a person who thus violates his agreement to say, the injured party might have performed the agreement and thus lessened the damages. Chicago, etc., R. R. Co. v. Ward, 16 Ill. 522; 1 Sutherland Dam. 151. If at a moderate expense, or by ordinary exertion, one can protect himself from the injurious consequences of the violation of a contract by another, it is his duty to do so. Where, however, the party whose duty it is primarily to perform a contract, has equal opportunity for performance, and equal knowledge of the consequences of non-performance, he can not, while the contract is subsisting and in force, be heard to say the plaintiff might have performed for him.
The plaintiff had the right to depend upon the defendant to perform its contract until it was repudiated, or until it became apparent that the railway company did not intend to execute it within a reasonable time. Upon the occurrence of either event, the plaintiff had the right to erect the fence himself, and call upon the defendant to refund the actual cost and to reimburse him for such special damage as directly resulted from its failure to perform the contract. Myers v. Burns, 35 N. Y. 269; Hexter v. Knox, 63 N. Y. 561.
The defendant, through its agent, having given assurance, when requested to perform its contract, that it would proceed *59to do so, it can not be said that the plaintiff was not justified in relying upon the assurances so given, and in reliance thereon postponing the erection of the fences himself.
It must be supposed that the defendant knew, when it made the contract, and in pursuance thereof exposed the plaintiff’s farm to injury by throwing the fields open to the public and rendering it hazardous for him to allow his own animals to pasture where they would be exposed to destruction by the defendant’s trains, that special damage would result. Such damages must, therefore, have been within the reasonable contemplation of the parties when the contract was made. That the duty which the railroad company owed arose by contract did not make the rule for the assessment of damages different from what it would have been if the duty to fence had been imposed by statute. In the latter case the value of crops destroyed may be recovered. Donald v. St. Louis, etc., R. W. Co., 44 Iowa, 157; Hull v. Chicago, etc., R. W. Co., 20 Am. & Eng. R. R. Cases, 341; Raridon v. Central Iowa R. W. Co., 19 Am. & Eng. R. R. Cases, 615.
Was the stipulátion in the deed “to locate and maintain a depot ” void ? Covenants of the character in question, so far as they have been the subject of judicial interpretation, are of three classes. There are those which stipulate for the location of stations or depots at particular places, and which prohibit the location of others within prescribed limits. All such as contain restrictive stipulations by which the railway company undertakes to prohibit itself from thereafter erecting other station-houses or depots within prescribed limits, are uniformly held to be void, as being violative of public policy.
Railroad corporations are regarded as public agencies, owing duties to the public generally. Accordingly, they can make no contract which shall prohibit them from serving the public as the future demands of busines or concentration of population may require. Williamson v. C., R. I. & P. R. R. Co., 53 Iowa, 126 (36 Am. R. 206); St. Louis, etc., R. R. Co. *60v. Mathers, 104 Ill. 257; St Louis, etc., R. R. Co. v. Mathers, 71 Ill. 592 (22 Am. R. 122); St. Joseph, etc., R. R. Co. v. Ryan, 11 Kan. 602 (15 Am. R. 357).
Another class consists of those cases in which an officer or other person supposed to be influential with a railway company, for a consideration promised him, agrees to secure the location of a station, depot or railway at a particular place. A conspicuous case in this class is Fuller v. Dame, 18 Pick.472. All such contracts are void as against public policy. Bestor v. Wathen, 60 Ill. 138; Linder v. Carpenter, 62 Ill. 309.
Still another class is that to which the case under consideration is allied. Such are the cases in which an agreement has been made, between an individual and a railway corporation, for the location of a station or depot at a particular place, in consideration of a donation of money or property to the corporation, without any restriction or prohibition against any other location.
No case has been brought to our notice, in which this question was involved, and the decision of which was not controlled by other considerations, which condemns such an agreement. On the contrary, it has been held that an agreement to pay a railway company a stipulated sum, in consideration that it would locate its route at a particular place, is valid and may be enforced. Cumberland R. R. Co. v. Baab, 9 Watts, 458; First Nat’l Bank, etc., v. Hendrie, 49 Iowa, 402 (31 Am. R. 153). So a conditional subscription of stock is valid. New Albany, etc., R. R. Co. v. McCormick, 10 Ind. 499; Jewett v. Lawrenceburgh, etc., R. R. Co., 10 Ind. 539.
A voluntary grant tó a railroad, on condition that it would locate its route and establish a depot at a certain place, was sustained as not being in contravention of public policy. McClure v. Mo. Riv., etc., R. R. Co., 9 Kan. 373.
That railway corporations have power to acquire either by purchase or by donation lands for depot purposes, is of course not questioned; and that donations or subscriptions in aid of railways by counties, cities or townships, may be subject to *61terms and conditions in respect to the location of machine shops, depots, etc., is expressly recognized by, and provided for, in sections 4045 and 4058, R. S. 1881. Such conditions have been held valid in cases of subscriptions made by townships. Bittinger v. Bell, 65 Ind. 445; Brocaw v. Board, etc., 73 Ind. 543.
Public policy, as declared by the Legislature and enforced by this court, permits counties, cities and townships to make subscriptions or donations to railway corporations, subject to conditions in respect to the location of depots. We can see no good reason why the courts should declare a different policy as between individuals and railway companies.
We should doubt whether in either case a restrictive condition, which should undertake to bind or prohibit the company from providing other facilities which might be needed for the public service at other places, might not invalidate an agreement, but as there is nothing of that character contained in the deed under consideration, we decide nothing beyond the question involved.
The case before us is in many respects analogous to Watterson v. Allegheny, etc., R. R. Co., 74 Pa. St. 208. In that case a land-owner, for a nominal consideration in money, released to the company a right of way over his land, and conveyed to it a lot on which to erect a depot. For a failure to comply with the contract, it was there held that the damage to which the land-owner was entitled, was the additional value which the advantages of a depot would have given his land. In a ease like this, the damages have no relation to the value of the land conveyed. They are to be determined by the injury actually sustained by the failure of the railway company to perform its contract, Galveston, etc., R. R. Co. v. Pfeuffer, 56 Texas, 66.
The damages which the law awards, when it is ascertainable with reasonable certainty, is the value of the consideration withheld.
The court admitted evidence tending to show the increase *62in value of the plaintiff’s remaining land, which the location of a station at the point agreed upon would have produced. There was no error in this. Varner v. St. Louis, etc., R. R. Co., 55 Iowa, 677.
Filed March 2, 1886; petition for a rehearing overruled June 5, 1886.The stipulation, in the deed under consideration, contains no restriction. The consideration for the agreement to locate the depot was received by the railroad company. The agreement was general in its character, and while not of a nature to be specifically enforced, it was properly the subject of damages. The case is not controlled by the decision in State v. Johnson, 52 Ind. 197.
The • railroad company, having accepted the deed, which contains on its face the covenants under consideration, manifestly, while claiming the land under such deed, can make no question concerning the authority of its agent to make the contracts which are the subjects of this litigation. This may be considered as disposing of all that is said in the argument concerning the failure to show authority in the agent to make the contracts in question.
It is suggested that the proof fails to show the delivery of the deed. The deed was offered in evidence, and the plaintiff testified that he and his wife executed it. As a delivery is included in the execution, prima facie this testimony showed a delivery.
Something is said about the contributory negligence of plaintiff in permitting his animals to be exposed to the unfenced track. Of course, if it appeared that the hogs were voluntarily turned upon or into a field where they were thus exposed, the question would require consideration. It does not so appear.
It may be that the damages were excessive, but as there is competent evidence in the record upon which the-jury may have found the amount assessed, we can not disturb their finding.
The judgment is affirmed, with costs.