@@ -23,7 +23,8 @@ fn decrease_weight(old_w: f64, dec_w: f64) -> f64 {
2323
2424
2525fn do_increase < P > ( entries : & mut Vec < Entry > , p : P , w : f64 ) -> Entry
26- where P : AsRef < path:: Path >
26+ where
27+ P : AsRef < path:: Path > ,
2728{
2829 let p = p. as_ref ( ) ;
2930
@@ -51,7 +52,8 @@ fn do_increase<P>(entries: &mut Vec<Entry>, p: P, w: f64) -> Entry
5152
5253
5354fn do_increase_and_save < P > ( config : & Config , p : P , w : f64 ) -> Entry
54- where P : AsRef < path:: Path >
55+ where
56+ P : AsRef < path:: Path > ,
5557{
5658 let mut entries = data:: load ( config) ;
5759 let entry = do_increase ( & mut entries, p, w) ;
@@ -61,7 +63,8 @@ fn do_increase_and_save<P>(config: &Config, p: P, w: f64) -> Entry
6163
6264
6365fn do_decrease < P > ( entries : & mut Vec < Entry > , p : P , w : f64 ) -> Entry
64- where P : AsRef < path:: Path >
66+ where
67+ P : AsRef < path:: Path > ,
6568{
6669 let p = p. as_ref ( ) ;
6770 for ent in entries. iter_mut ( ) {
@@ -75,14 +78,15 @@ fn do_decrease<P>(entries: &mut Vec<Entry>, p: P, w: f64) -> Entry
7578 // TODO: original impl also adds an entry in case the requested path is
7679 // absent, but is it desirable?
7780 // For now let's mimic its behavior...
78- let entry = Entry :: new ( p, 0.0 ) ; // no need to compare
81+ let entry = Entry :: new ( p, 0.0 ) ; // no need to compare
7982 entries. push ( entry. clone ( ) ) ;
8083 entry
8184}
8285
8386
8487fn do_decrease_and_save < P > ( config : & Config , p : P , w : f64 ) -> Entry
85- where P : AsRef < path:: Path >
88+ where
89+ P : AsRef < path:: Path > ,
8690{
8791 let mut entries = data:: load ( config) ;
8892 let entry = do_decrease ( & mut entries, p, w) ;
@@ -92,7 +96,8 @@ fn do_decrease_and_save<P>(config: &Config, p: P, w: f64) -> Entry
9296
9397
9498pub fn add < P > ( config : & Config , p : P )
95- where P : AsRef < path:: Path >
99+ where
100+ P : AsRef < path:: Path > ,
96101{
97102 do_increase_and_save ( config, p, DEFAULT_INCREASE_WEIGHT as f64 ) ;
98103}
0 commit comments