mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
remove direct memory access
This commit is contained in:
parent
33369e31ea
commit
19a07cdf1d
32 changed files with 112 additions and 111 deletions
|
|
@ -9,21 +9,21 @@ use gtk::{
|
|||
glib::{Uri, UriFlags},
|
||||
prelude::{ActionExt, CancellableExt},
|
||||
};
|
||||
use std::{cell::Cell, rc::Rc};
|
||||
use std::{cell::Cell, rc::Rc, sync::Arc};
|
||||
|
||||
/// Multi-protocol client API for tab `Item`
|
||||
pub struct Client {
|
||||
cancellable: Cell<Cancellable>,
|
||||
driver: Rc<Driver>,
|
||||
page: Rc<Page>,
|
||||
profile: Rc<Profile>,
|
||||
profile: Arc<Profile>,
|
||||
}
|
||||
|
||||
impl Client {
|
||||
// Constructors
|
||||
|
||||
/// Create new `Self`
|
||||
pub fn init(profile: &Rc<Profile>, page: &Rc<Page>) -> Self {
|
||||
pub fn init(profile: &Arc<Profile>, page: &Rc<Page>) -> Self {
|
||||
Self {
|
||||
cancellable: Cell::new(Cancellable::new()),
|
||||
driver: Rc::new(Driver::build(page)),
|
||||
|
|
@ -108,7 +108,7 @@ impl Client {
|
|||
/// Create request using async DNS resolver (slow method)
|
||||
/// * return suggestion [Uri](https://docs.gtk.org/glib/struct.Uri.html) on failure (to handle as redirect)
|
||||
fn lookup(
|
||||
profile: &Rc<Profile>,
|
||||
profile: &Arc<Profile>,
|
||||
query: &str,
|
||||
cancellable: Cancellable,
|
||||
callback: impl FnOnce(Rc<Feature>, Cancellable, Result<Uri, String>) + 'static,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue