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,
|
TlsClientConnection,
|
||||||
};
|
};
|
||||||
use glib::{object::Cast, Bytes, Priority, Uri};
|
use glib::{object::Cast, Bytes, Priority, Uri};
|
||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
pub const DEFAULT_TIMEOUT: u32 = 10;
|
pub const DEFAULT_TIMEOUT: u32 = 10;
|
||||||
|
|
||||||
|
|
@ -104,7 +103,7 @@ impl Client {
|
||||||
Ok(connection) => {
|
Ok(connection) => {
|
||||||
// Begin new request
|
// Begin new request
|
||||||
request_async(
|
request_async(
|
||||||
Rc::new(connection),
|
connection,
|
||||||
uri.to_string(),
|
uri.to_string(),
|
||||||
priority,
|
priority,
|
||||||
cancellable,
|
cancellable,
|
||||||
|
|
@ -125,7 +124,7 @@ impl Client {
|
||||||
/// Middle-level method to make new request to `Connection`
|
/// Middle-level method to make new request to `Connection`
|
||||||
/// * callback with new `Response`on success or `Error` on failure
|
/// * callback with new `Response`on success or `Error` on failure
|
||||||
pub fn request_async(
|
pub fn request_async(
|
||||||
connection: Rc<Connection>,
|
connection: Connection,
|
||||||
query: String,
|
query: String,
|
||||||
priority: Option<Priority>,
|
priority: Option<Priority>,
|
||||||
cancellable: Option<Cancellable>,
|
cancellable: Option<Cancellable>,
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,9 @@ pub use meta::Meta;
|
||||||
use super::Connection;
|
use super::Connection;
|
||||||
use gio::Cancellable;
|
use gio::Cancellable;
|
||||||
use glib::Priority;
|
use glib::Priority;
|
||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
pub struct Response {
|
pub struct Response {
|
||||||
pub connection: Rc<Connection>,
|
pub connection: Connection,
|
||||||
pub meta: Meta,
|
pub meta: Meta,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21,7 +20,7 @@ impl Response {
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
pub fn from_request_async(
|
pub fn from_request_async(
|
||||||
connection: Rc<Connection>,
|
connection: Connection,
|
||||||
priority: Option<Priority>,
|
priority: Option<Priority>,
|
||||||
cancellable: Option<Cancellable>,
|
cancellable: Option<Cancellable>,
|
||||||
callback: impl FnOnce(Result<Self, Error>) + 'static,
|
callback: impl FnOnce(Result<Self, Error>) + 'static,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue