Open G1gg1L3s opened 8 months ago
In the current version, the Yubikey::save_object method requires a mutable reference to the data being saved:
Yubikey::save_object
https://github.com/iqlusioninc/yubikey.rs/blob/b07612eb4e92331c4d2a419b53654ba9cefc4b31/src/yubikey.rs#L629-L634
However, it appears that the mutability requirement is unnecessary, given that the Transaction::save_object method accepts an immutable slice:
Transaction::save_object
https://github.com/iqlusioninc/yubikey.rs/blob/b07612eb4e92331c4d2a419b53654ba9cefc4b31/src/transaction.rs#L486-L488
I understand that this modification is currently marked under the untested feature. Nevertheless, moving to the use of an immutable slice would definitely enhance the API.
untested
In the current version, the
Yubikey::save_object
method requires a mutable reference to the data being saved:https://github.com/iqlusioninc/yubikey.rs/blob/b07612eb4e92331c4d2a419b53654ba9cefc4b31/src/yubikey.rs#L629-L634
However, it appears that the mutability requirement is unnecessary, given that the
Transaction::save_object
method accepts an immutable slice:https://github.com/iqlusioninc/yubikey.rs/blob/b07612eb4e92331c4d2a419b53654ba9cefc4b31/src/transaction.rs#L486-L488
I understand that this modification is currently marked under the
untested
feature. Nevertheless, moving to the use of an immutable slice would definitely enhance the API.