rust/pvsecret: Refactor writing secret

Refactor the writing of secret-type dependent output files to ease
extensions.

Reviewed-by: Marc Hartmayer <marc@linux.ibm.com>
Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Steffen Eiden
2024-07-18 10:55:45 +02:00
committed by Jan Höppner
parent a9b8caa411
commit 1e44ace41d
2 changed files with 48 additions and 43 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ impl GuestSecret {
}
/// Reference to the confidential data
pub(crate) fn confidential(&self) -> &[u8] {
pub fn confidential(&self) -> &[u8] {
match &self {
Self::Null => &[],
Self::Association { secret, .. } => secret.value().as_slice(),