softprops / hyperlocal

🔌 ✨rustlang hyper bindings for local unix domain sockets
MIT License
227 stars 46 forks source link

Make the wrapper type for Uri cloneable #46

Closed mattixtech closed 3 years ago

mattixtech commented 3 years ago

The Uri type does not currently derive Clone. The Uri from hyper being wrapped does support clone so looks like there is no reason the hyperlocal type should not as well.

Since building HTTP requests can take the URI as a moved value, it is convenient to be able to clone the type if building multiple requests. Otherwise you may need to explicitly instantiate a new Uri each time.

softprops commented 3 years ago

Thanks. Nice catch