mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
use Cell as never borrow
This commit is contained in:
parent
e7868a9dcf
commit
04ca502bf2
1 changed files with 3 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
use gtk::{gio::Cancellable, prelude::CancellableExt};
|
use gtk::{gio::Cancellable, prelude::CancellableExt};
|
||||||
use std::cell::RefCell;
|
use std::cell::Cell;
|
||||||
|
|
||||||
/// Multi-client holder for single `Page` object
|
/// Multi-client holder for single `Page` object
|
||||||
///
|
///
|
||||||
|
|
@ -9,7 +9,7 @@ use std::cell::RefCell;
|
||||||
/// e.g. session resumption or multi-thread connection management (depending of client type selected)
|
/// e.g. session resumption or multi-thread connection management (depending of client type selected)
|
||||||
pub struct Client {
|
pub struct Client {
|
||||||
// Shared reference to cancel async operations
|
// Shared reference to cancel async operations
|
||||||
cancellable: RefCell<Cancellable>,
|
cancellable: Cell<Cancellable>,
|
||||||
// Clients
|
// Clients
|
||||||
pub gemini: gemini::Client,
|
pub gemini: gemini::Client,
|
||||||
// other clients..
|
// other clients..
|
||||||
|
|
@ -21,7 +21,7 @@ impl Client {
|
||||||
/// Create new `Self`
|
/// Create new `Self`
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self {
|
||||||
cancellable: RefCell::new(Cancellable::new()),
|
cancellable: Cell::new(Cancellable::new()),
|
||||||
gemini: gemini::Client::new(),
|
gemini: gemini::Client::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue