@@ -27,7 +27,7 @@ use log::{error, info};
2727use toml:: Value ;
2828
2929use crate :: framework:: { error:: Result , node:: Mode } ;
30- pub use data:: { Config as ConfigConfig , ConfigData , MarginFps , ModeConfig , TemperatureThreshold } ;
30+ pub use data:: { ConfigData , MarginFps , ModeConfig , TemperatureThreshold } ;
3131use read:: wait_and_read;
3232
3333#[ derive( Debug , Clone , PartialEq , Eq ) ]
@@ -42,7 +42,10 @@ pub struct Config {
4242}
4343
4444impl Config {
45- pub fn new < P : AsRef < Path > > ( p : P , sp : P ) -> Result < Self > {
45+ pub fn new < P > ( p : P , sp : P ) -> Result < Self >
46+ where
47+ P : AsRef < Path > ,
48+ {
4649 let path = p. as_ref ( ) ;
4750 let std_path = sp. as_ref ( ) ;
4851 let toml_raw = fs:: read_to_string ( path) ?;
@@ -68,14 +71,20 @@ impl Config {
6871 Ok ( Self { inner } )
6972 }
7073
71- pub fn need_fas < S : AsRef < str > > ( & mut self , pkg : S ) -> bool {
74+ pub fn need_fas < S > ( & mut self , pkg : S ) -> bool
75+ where
76+ S : AsRef < str > ,
77+ {
7278 let pkg = pkg. as_ref ( ) ;
7379
7480 self . inner . config ( ) . game_list . contains_key ( pkg)
7581 || self . inner . config ( ) . scene_game_list . contains ( pkg)
7682 }
7783
78- pub fn target_fps < S : AsRef < str > > ( & mut self , pkg : S ) -> Option < TargetFps > {
84+ pub fn target_fps < S > ( & mut self , pkg : S ) -> Option < TargetFps >
85+ where
86+ S : AsRef < str > ,
87+ {
7988 let pkg = pkg. as_ref ( ) ;
8089 let pkg = pkg. split ( ':' ) . next ( ) ?;
8190
@@ -125,9 +134,4 @@ impl Config {
125134 Mode :: Fast => & self . inner . config ( ) . fast ,
126135 }
127136 }
128-
129- #[ must_use]
130- pub fn config ( & mut self ) -> ConfigConfig {
131- self . inner . config ( ) . config
132- }
133137}
0 commit comments