Skip to content

Commit 4ed5078

Browse files
eNV25ryze312
authored andcommitted
cargo fmt
1 parent 063acaa commit 4ed5078

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/command.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use std::env;
22
use std::io;
33
use std::process;
4-
use serde_json::{self, json};
4+
5+
use serde_json::json;
56

67
use crate::browser;
78
use crate::config::Config;
@@ -94,7 +95,7 @@ impl Command {
9495
// NOTE: On Windows, browser spawns process into a Job object.
9596
// NOTE: We need to detach player from the job, so it won't get killed after we're done,
9697
// 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)]
9899
{
99100
use std::os::windows::process::CommandExt;
100101
const CREATE_BREAKAWAY_FROM_JOB: u32 = 0x01000000;

src/config.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::env;
22
use std::fs;
33
use std::path::PathBuf;
4+
45
use serde::Deserialize;
56

67
use crate::error::FF2MpvError;
@@ -16,7 +17,7 @@ impl Default for Config {
1617
fn default() -> Self {
1718
Self {
1819
player_command: "mpv".to_owned(),
19-
player_args: vec![]
20+
player_args: vec![],
2021
}
2122
}
2223
}
@@ -40,7 +41,7 @@ impl Config {
4041
Ok(config)
4142
}
4243

43-
#[cfg(target_family = "unix")]
44+
#[cfg(unix)]
4445
fn get_config_location() -> PathBuf {
4546
let mut path = PathBuf::new();
4647

@@ -57,7 +58,7 @@ impl Config {
5758
path
5859
}
5960

60-
#[cfg(target_family = "windows")]
61+
#[cfg(windows)]
6162
fn get_config_location() -> PathBuf {
6263
let mut path = PathBuf::new();
6364
let appdata = env::var("APPDATA").unwrap();

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use std::io;
21
use std::fmt;
32
use std::fmt::Display;
3+
use std::io;
44

55
pub enum FF2MpvError {
66
NoConfig,

0 commit comments

Comments
 (0)