gluxon / wireguard-uapi-rs

MIT License
32 stars 10 forks source link

xplatform: set: peer: Add chainable setters to Peer #19

Closed ernestask closed 2 years ago

ernestask commented 2 years ago

Since the Netlink variant of Peer has this, this commit at least makes things more consistent, as well as ergonomic

ernestask commented 2 years ago

This is purely a quality-of-life improvement that I thought I would contribute, so feel free to close the PR if you don’t like it.

I was also not sure if remove(), update_only() and replace_allowed_ips() should have parameters, because I couldn’t imagine a scenario where I would pass anything but true.