mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 16:04:15 +00:00
remove deprecated construction
This commit is contained in:
parent
da3618aa0a
commit
fed376ea2f
@ -26,7 +26,7 @@ use gtk::{
|
||||
Box,
|
||||
};
|
||||
use sqlite::Transaction;
|
||||
use std::{cell::RefCell, path::Path, sync::Arc};
|
||||
use std::{cell::RefCell, sync::Arc};
|
||||
|
||||
pub struct Page {
|
||||
id: GString,
|
||||
@ -250,19 +250,10 @@ impl Page {
|
||||
// Format response
|
||||
meta.borrow_mut().status = Some(Status::Response);
|
||||
meta.borrow_mut().description = Some(host);
|
||||
meta.borrow_mut().title = Some(uri.path());
|
||||
meta.borrow_mut().title = uri.host();
|
||||
|
||||
action_update.activate(Some(&id));
|
||||
|
||||
// Try create short base for title
|
||||
let path = uri.path();
|
||||
let path = Path::new(&path);
|
||||
if let Some(base) = path.file_name() {
|
||||
if let Some(base_str) = base.to_str() {
|
||||
meta.borrow_mut().title = Some(GString::from(base_str));
|
||||
}
|
||||
}
|
||||
|
||||
// Parse response @TODO read bytes
|
||||
let parts = Regex::split_simple(
|
||||
r"^(\d+)?\s([\w]+\/[\w]+)?(.*)?",
|
||||
|
Loading…
x
Reference in New Issue
Block a user