change reference to be mutable
This commit is contained in:
parent
98bf70ec5e
commit
809702bc1d
|
@ -154,7 +154,7 @@ pub struct UserObject {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct User<'a> {
|
pub struct User<'a> {
|
||||||
pub logged_in: bool,
|
pub logged_in: bool,
|
||||||
pub belongs_to: &'a Instance<'a>,
|
pub belongs_to: &'a mut Instance<'a>,
|
||||||
token: String,
|
token: String,
|
||||||
pub rate_limits: Limits,
|
pub rate_limits: Limits,
|
||||||
pub settings: UserSettings,
|
pub settings: UserSettings,
|
||||||
|
@ -166,7 +166,7 @@ impl<'a> User<'a> {
|
||||||
self.logged_in
|
self.logged_in
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn belongs_to(&self) -> &Instance {
|
pub fn belongs_to(&mut self) -> &mut Instance<'a> {
|
||||||
self.belongs_to
|
self.belongs_to
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ impl<'a> User<'a> {
|
||||||
|
|
||||||
pub fn new(
|
pub fn new(
|
||||||
logged_in: bool,
|
logged_in: bool,
|
||||||
belongs_to: &'a Instance<'a>,
|
belongs_to: &'a mut Instance<'a>,
|
||||||
token: String,
|
token: String,
|
||||||
rate_limits: Limits,
|
rate_limits: Limits,
|
||||||
settings: UserSettings,
|
settings: UserSettings,
|
||||||
|
|
Loading…
Reference in New Issue