When the carriages which pass over a highway or a bridge, and the lighters which sail upon a navigable canal, pay toll in proportion to their weight or their tonnage, they pay for the maintenance of those public