mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
remove rc wrap
This commit is contained in:
parent
98c6150f74
commit
0cc6d10017
2 changed files with 4 additions and 6 deletions
|
|
@ -15,7 +15,6 @@ use gio::{
|
|||
TlsClientConnection,
|
||||
};
|
||||
use glib::{object::Cast, Bytes, Priority, Uri};
|
||||
use std::rc::Rc;
|
||||
|
||||
pub const DEFAULT_TIMEOUT: u32 = 10;
|
||||
|
||||
|
|
@ -104,7 +103,7 @@ impl Client {
|
|||
Ok(connection) => {
|
||||
// Begin new request
|
||||
request_async(
|
||||
Rc::new(connection),
|
||||
connection,
|
||||
uri.to_string(),
|
||||
priority,
|
||||
cancellable,
|
||||
|
|
@ -125,7 +124,7 @@ impl Client {
|
|||
/// Middle-level method to make new request to `Connection`
|
||||
/// * callback with new `Response`on success or `Error` on failure
|
||||
pub fn request_async(
|
||||
connection: Rc<Connection>,
|
||||
connection: Connection,
|
||||
query: String,
|
||||
priority: Option<Priority>,
|
||||
cancellable: Option<Cancellable>,
|
||||
|
|
|
|||
|
|
@ -10,10 +10,9 @@ pub use meta::Meta;
|
|||
use super::Connection;
|
||||
use gio::Cancellable;
|
||||
use glib::Priority;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub struct Response {
|
||||
pub connection: Rc<Connection>,
|
||||
pub connection: Connection,
|
||||
pub meta: Meta,
|
||||
}
|
||||
|
||||
|
|
@ -21,7 +20,7 @@ impl Response {
|
|||
// Constructors
|
||||
|
||||
pub fn from_request_async(
|
||||
connection: Rc<Connection>,
|
||||
connection: Connection,
|
||||
priority: Option<Priority>,
|
||||
cancellable: Option<Cancellable>,
|
||||
callback: impl FnOnce(Result<Self, Error>) + 'static,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue