File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
2
use std:: io;
3
3
use std:: process;
4
- use serde_json:: { self , json} ;
4
+
5
+ use serde_json:: json;
5
6
6
7
use crate :: browser;
7
8
use crate :: config:: Config ;
@@ -94,7 +95,7 @@ impl Command {
94
95
// NOTE: On Windows, browser spawns process into a Job object.
95
96
// NOTE: We need to detach player from the job, so it won't get killed after we're done,
96
97
// NOTE: See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging#closing_the_native_app
97
- #[ cfg( target_family = " windows" ) ]
98
+ #[ cfg( windows) ]
98
99
{
99
100
use std:: os:: windows:: process:: CommandExt ;
100
101
const CREATE_BREAKAWAY_FROM_JOB : u32 = 0x01000000 ;
Original file line number Diff line number Diff line change 1
1
use std:: env;
2
2
use std:: fs;
3
3
use std:: path:: PathBuf ;
4
+
4
5
use serde:: Deserialize ;
5
6
6
7
use crate :: error:: FF2MpvError ;
@@ -16,7 +17,7 @@ impl Default for Config {
16
17
fn default ( ) -> Self {
17
18
Self {
18
19
player_command : "mpv" . to_owned ( ) ,
19
- player_args : vec ! [ ]
20
+ player_args : vec ! [ ] ,
20
21
}
21
22
}
22
23
}
@@ -40,7 +41,7 @@ impl Config {
40
41
Ok ( config)
41
42
}
42
43
43
- #[ cfg( target_family = " unix" ) ]
44
+ #[ cfg( unix) ]
44
45
fn get_config_location ( ) -> PathBuf {
45
46
let mut path = PathBuf :: new ( ) ;
46
47
@@ -57,7 +58,7 @@ impl Config {
57
58
path
58
59
}
59
60
60
- #[ cfg( target_family = " windows" ) ]
61
+ #[ cfg( windows) ]
61
62
fn get_config_location ( ) -> PathBuf {
62
63
let mut path = PathBuf :: new ( ) ;
63
64
let appdata = env:: var ( "APPDATA" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change 1
- use std:: io;
2
1
use std:: fmt;
3
2
use std:: fmt:: Display ;
3
+ use std:: io;
4
4
5
5
pub enum FF2MpvError {
6
6
NoConfig ,
You can’t perform that action at this time.
0 commit comments