File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,9 @@ pub trait Runner {
108
108
/// Get the common runner information
109
109
fn info ( & self ) -> & RunnerInfo ;
110
110
111
+ /// Get the common runner information
112
+ fn info_mut ( & mut self ) -> & mut RunnerInfo ;
113
+
111
114
/// Check if the runner executable is available and functional
112
115
fn is_available ( & self ) -> bool {
113
116
let executable_path = self . info ( ) . executable_path ( ) ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ impl TryFrom<&Path> for Proton {
17
17
let executable = PathBuf :: from ( "./proton" ) ;
18
18
let info = RunnerInfo :: try_from ( path, & executable) ?;
19
19
let mut wine = Wine :: try_from ( path. join ( "files" ) . as_path ( ) ) ?;
20
+ wine. info_mut ( ) . name = info. name . clone ( ) ;
20
21
Ok ( Proton { wine, info } )
21
22
}
22
23
}
@@ -29,4 +30,8 @@ impl Runner for Proton {
29
30
fn info ( & self ) -> & RunnerInfo {
30
31
& self . info
31
32
}
33
+
34
+ fn info_mut ( & mut self ) -> & mut RunnerInfo {
35
+ & mut self . info
36
+ }
32
37
}
Original file line number Diff line number Diff line change @@ -34,4 +34,8 @@ impl Runner for UMU {
34
34
fn info ( & self ) -> & RunnerInfo {
35
35
& self . info
36
36
}
37
+
38
+ fn info_mut ( & mut self ) -> & mut RunnerInfo {
39
+ & mut self . info
40
+ }
37
41
}
Original file line number Diff line number Diff line change @@ -35,4 +35,8 @@ impl Runner for Wine {
35
35
fn info ( & self ) -> & RunnerInfo {
36
36
& self . info
37
37
}
38
+
39
+ fn info_mut ( & mut self ) -> & mut RunnerInfo {
40
+ & mut self . info
41
+ }
38
42
}
You can’t perform that action at this time.
0 commit comments