Closed wiktor-k closed 1 month ago
Ah yep, this was me failing to address #387 correctly. I didn't actually add a test that my change (to make the arguments optional) was sufficient, and it turns out to be a terrible option to use. So I'm going to undo the change and instead add two separate helper methods for recipient-only and identity-only plugins.
Environment
Hi, I'm using
age-plugin = "0.5.0"
What were you trying to do
I'm working on an age plugin which only has identity state transition (not recipient) since it works with ed25519 keys.
There's this fragment of code:
Full sample here: https://github.com/wiktor-k/age-plugin-openpgp-card/blob/fd309b4140377c6515f9bd22deceb8e3cead02ad/src/main.rs#L244-L250
And I want to set
Some(|| RecipientPlugin)
toNone
(at least that's what I think it's for) but then...What happened
It seems it still needs a type which implements the RecipientPlugin trait but I don't want to pass any :)
Please tell if I'm holding it wrong :)
Btw, any other remarks to the code are much appreciated, I'm working with the API for a couple of hours only and even though it works I'm not sure everything is kosher.
Btw 2: the age-plugin crate is really fantastic: I could build my own extension in a matter of hours. Rage is also very nice and debugging with
AGEDEBUG=plugin RUST_LOG=debug
has been a real time-saver!Thank you very much! :bow: