mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
remove extra lines
This commit is contained in:
parent
e580aae83b
commit
29f740a716
1 changed files with 4 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
use super::{Feature, Page};
|
use super::{Feature, Page};
|
||||||
use ggemini::client::connection::response::{
|
use ggemini::client::connection::response::{
|
||||||
failure::{Permanent, Temporary},
|
failure::{Permanent, Temporary},
|
||||||
Certificate, Failure, Input, Redirect, Success,
|
Certificate, Failure, Input, Redirect,
|
||||||
};
|
};
|
||||||
use ggemini::client::{connection::response::data::Text, Client, Request, Response};
|
use ggemini::client::{connection::response::data::Text, Client, Request, Response};
|
||||||
use gtk::glib::Bytes;
|
use gtk::glib::Bytes;
|
||||||
|
|
@ -164,7 +164,7 @@ fn handle(
|
||||||
}
|
}
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-20
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-20
|
||||||
Response::Success(success) => match success {
|
Response::Success(success) => match success {
|
||||||
Success::Default { mime } => match *feature {
|
_ => match *feature {
|
||||||
Feature::Download => {
|
Feature::Download => {
|
||||||
// Init download widget
|
// Init download widget
|
||||||
let status = page.content.to_status_download(
|
let status = page.content.to_status_download(
|
||||||
|
|
@ -232,7 +232,7 @@ fn handle(
|
||||||
page.set_title(&status.title());
|
page.set_title(&status.title());
|
||||||
redirects.replace(0); // reset
|
redirects.replace(0); // reset
|
||||||
},
|
},
|
||||||
_ => match mime.as_str() {
|
_ => match success.mime() {
|
||||||
"text/gemini" => Text::from_stream_async(
|
"text/gemini" => Text::from_stream_async(
|
||||||
connection.stream(),
|
connection.stream(),
|
||||||
Priority::DEFAULT,
|
Priority::DEFAULT,
|
||||||
|
|
@ -333,8 +333,7 @@ fn handle(
|
||||||
Response::Redirect(redirect) => match &redirect {
|
Response::Redirect(redirect) => match &redirect {
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-30-temporary-redirection
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-30-temporary-redirection
|
||||||
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-31-permanent-redirection
|
// https://geminiprotocol.net/docs/protocol-specification.gmi#status-31-permanent-redirection
|
||||||
Redirect::Temporary { .. } |
|
_ => match redirect.to_uri(&uri) {
|
||||||
Redirect::Permanent { .. } => match redirect.to_uri(&uri) {
|
|
||||||
Ok(target) => {
|
Ok(target) => {
|
||||||
// Increase client redirection counter
|
// Increase client redirection counter
|
||||||
let total = redirects.take() + 1;
|
let total = redirects.take() + 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue