Xion / gisht

Gists in the shell
GNU General Public License v2.0
27 stars 0 forks source link

Use associated constants in Host #20

Closed Xion closed 6 years ago

Xion commented 7 years ago

With Rust 1.20, we can make Host::id an associated constant rather than a method.

Xion commented 6 years ago

Actually, this needs to stay a method since otherwise Basic hosts would have to impl Host themselves via unique types rather than just creating & returning a plain Basic object. Since we have like half a dozen of those basic hosts, it doesn't make to introduce additional boilerplate.