daemon: Return reference to state

This commit is contained in:
Vicki Pfau 2025-07-11 18:34:31 -07:00
parent 77f7305dd3
commit 85e0f8c52b
3 changed files with 5 additions and 5 deletions

View file

@ -38,7 +38,7 @@ pub(crate) trait DaemonContext: Sized {
fn user_config_path(&self) -> Result<PathBuf>;
fn system_config_path(&self) -> Result<PathBuf>;
fn state(&self) -> Self::State;
fn state(&self) -> &Self::State;
async fn start(
&mut self,

View file

@ -111,8 +111,8 @@ impl DaemonContext for RootContext {
Ok(path("/usr/share/steamos-manager/system.d"))
}
fn state(&self) -> RootState {
self.state
fn state(&self) -> &RootState {
&self.state
}
async fn start(

View file

@ -71,8 +71,8 @@ impl DaemonContext for UserContext {
Ok(path("/usr/share/steamos-manager/user.d"))
}
fn state(&self) -> UserState {
UserState::default()
fn state(&self) -> &UserState {
&self.state
}
async fn start(