implement to_string method, prevent memory index overwrite on validation step

This commit is contained in:
yggverse 2024-11-23 18:04:57 +02:00
parent cda94cba2e
commit c86dca53bd
10 changed files with 100 additions and 21 deletions

View file

@ -119,18 +119,24 @@ impl Gemini {
Value::ProfileIdentityGeminiId(value) => Some(value),
Value::UseGuestSession => None,
Value::GenerateNewAuth => Some(
profile
match profile
.identity
.gemini
.make(None, &widget.form.name.value().unwrap())
.unwrap(),
{
Ok(profile_identity_gemini_id) => profile_identity_gemini_id,
Err(reason) => todo!("{}", reason.to_string()),
},
),
Value::ImportPem => Some(
profile
match profile
.identity
.gemini
.add(&widget.form.file.pem.take().unwrap())
.unwrap(),
{
Ok(profile_identity_gemini_id) => profile_identity_gemini_id,
Err(reason) => todo!("{}", reason.to_string()),
},
),
};