replace gformat with into

This commit is contained in:
yggverse 2025-01-17 07:42:33 +02:00
parent 4e48600d80
commit c97648539f

View File

@ -4,7 +4,7 @@ use super::{
}; };
use gtk::{ use gtk::{
gio::Cancellable, gio::Cancellable,
glib::{gformat, Priority, Uri}, glib::{Priority, Uri},
}; };
use std::rc::Rc; use std::rc::Rc;
@ -51,14 +51,14 @@ pub fn handle(
base, base,
title: match response.meta.data { title: match response.meta.data {
Some(data) => data.value, Some(data) => data.value,
None => gformat!("Input expected"), None => "Input expected".into(),
}, },
})), })),
Status::SensitiveInput => callback(Response::Input(Input::Sensitive { Status::SensitiveInput => callback(Response::Input(Input::Sensitive {
base, base,
title: match response.meta.data { title: match response.meta.data {
Some(data) => data.value, Some(data) => data.value,
None => gformat!("Input expected"), None => "Input expected".into(),
}, },
})), })),
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-20 // https://geminiprotocol.net/docs/protocol-specification.gmi#status-20
@ -107,7 +107,7 @@ pub fn handle(
Status::CertificateRequest => callback(Response::Certificate(Certificate::Request { Status::CertificateRequest => callback(Response::Certificate(Certificate::Request {
title: match response.meta.data { title: match response.meta.data {
Some(data) => data.value, Some(data) => data.value,
None => gformat!("Client certificate required"), None => "Client certificate required".into(),
}, },
})), })),
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-61-certificate-not-authorized // https://geminiprotocol.net/docs/protocol-specification.gmi#status-61-certificate-not-authorized
@ -115,7 +115,7 @@ pub fn handle(
callback(Response::Certificate(Certificate::Request { callback(Response::Certificate(Certificate::Request {
title: match response.meta.data { title: match response.meta.data {
Some(data) => data.value, Some(data) => data.value,
None => gformat!("Certificate not authorized"), None => "Certificate not authorized".into(),
}, },
})) }))
} }
@ -123,7 +123,7 @@ pub fn handle(
Status::CertificateInvalid => callback(Response::Certificate(Certificate::Request { Status::CertificateInvalid => callback(Response::Certificate(Certificate::Request {
title: match response.meta.data { title: match response.meta.data {
Some(data) => data.value, Some(data) => data.value,
None => gformat!("Certificate not valid"), None => "Certificate not valid".into(),
}, },
})), })),
status => callback(Response::Failure(Failure::Status { status => callback(Response::Failure(Failure::Status {