summaryrefslogtreecommitdiff
path: root/semver-parser/src/common.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-01-09 16:34:53 -0800
committerDaniel Mueller <deso@posteo.net>2019-01-09 16:34:53 -0800
commitac7025cbe1bc46d25dd978138c6b397d77853232 (patch)
treecf4724fd70de53cfe732901ba36545d0bf8d5103 /semver-parser/src/common.rs
parent4e83e8f9a79bcd26435b66d9faed72ff98a45555 (diff)
downloadnitrocli-ac7025cbe1bc46d25dd978138c6b397d77853232.tar.gz
nitrocli-ac7025cbe1bc46d25dd978138c6b397d77853232.tar.bz2
Make pinentry::inquire_pin return String directly
The inquire_pin function of the pinentry module used to return a vector of bytes, as that is what is ultimately read from the gpg-agent process. All clients of this function, however, work with a string and, hence, convert this vector into a string. As it turns out, for better or worse, the pinentry::parse_pinentry_pin function (which produces the result of inquire_pin) internally already works with a string but then converts it back. That is both not useful and a waste of resources. This change adjusts both functions of interest to simply return a String object instead, removing the need for conversions at the clients. While at it, the patch also removes the need for a bunch of unnecessary allocations caused by sub-par parameter type choice.
Diffstat (limited to 'semver-parser/src/common.rs')
0 files changed, 0 insertions, 0 deletions