Fixed instance lifetime parameter
This commit is contained in:
parent
bc3e93ce5a
commit
8414bbb1c2
|
@ -8,7 +8,7 @@ pub mod login {
|
|||
use crate::errors::InstanceServerError;
|
||||
use crate::instance::Instance;
|
||||
|
||||
impl Instance<'_> {
|
||||
impl<'a> Instance<'a> {
|
||||
pub async fn login_account(
|
||||
&mut self,
|
||||
login_schema: &LoginSchema,
|
||||
|
|
|
@ -8,7 +8,7 @@ pub mod register {
|
|||
instance::{Instance, Token},
|
||||
};
|
||||
|
||||
impl Instance<'_> {
|
||||
impl<'a> Instance<'a> {
|
||||
/**
|
||||
Registers a new user on the Spacebar server.
|
||||
# Arguments
|
||||
|
|
|
@ -5,7 +5,7 @@ pub mod instance {
|
|||
use crate::errors::InstanceServerError;
|
||||
use crate::{api::types::InstancePolicies, instance::Instance};
|
||||
|
||||
impl Instance<'_> {
|
||||
impl<'a> Instance<'a> {
|
||||
/**
|
||||
Gets the instance policies schema.
|
||||
# Errors
|
||||
|
|
|
@ -20,7 +20,7 @@ pub struct Instance<'a> {
|
|||
pub users: HashMap<Token, User>,
|
||||
}
|
||||
|
||||
impl Instance<'_> {
|
||||
impl<'a> Instance<'a> {
|
||||
/// Creates a new [`Instance`].
|
||||
/// # Arguments
|
||||
/// * `urls` - The [`URLBundle`] that contains all the URLs that are needed to connect to the Spacebar server.
|
||||
|
@ -30,7 +30,7 @@ impl Instance<'_> {
|
|||
pub async fn new(
|
||||
urls: URLBundle,
|
||||
requester: LimitedRequester,
|
||||
) -> Result<Instance<'static>, InstanceServerError> {
|
||||
) -> Result<Instance<'a>, InstanceServerError> {
|
||||
let users: HashMap<Token, User> = HashMap::new();
|
||||
let mut instance = Instance {
|
||||
urls: urls.clone(),
|
||||
|
|
Loading…
Reference in New Issue