Rename the aa_mode
attribute to aaa_mode
This commit is contained in:
parent
1bd28299fe
commit
29a5336858
1 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ impl FromStr for PlayerSettings {
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
let mut repeat = false;
|
let mut repeat = false;
|
||||||
let mut shuffle = Shuffle::default();
|
let mut shuffle = Shuffle::default();
|
||||||
let mut aa_mode = AAAMode::default();
|
let mut aaa_mode = AAAMode::default();
|
||||||
let mut volume = Volume::default();
|
let mut volume = Volume::default();
|
||||||
|
|
||||||
for line in s.lines() {
|
for line in s.lines() {
|
||||||
|
@ -75,7 +75,7 @@ impl FromStr for PlayerSettings {
|
||||||
match key {
|
match key {
|
||||||
"repeat" => repeat = value == "true",
|
"repeat" => repeat = value == "true",
|
||||||
"shuffle" => shuffle = Shuffle::from_str(value)?,
|
"shuffle" => shuffle = Shuffle::from_str(value)?,
|
||||||
"aaa_mode" => aa_mode = AAAMode::from_str(value)?,
|
"aaa_mode" => aaa_mode = AAAMode::from_str(value)?,
|
||||||
"vol_left" => volume.left = value.parse().map_err(|e: ParseIntError| CmusError::UnknownError(e.to_string()))?,
|
"vol_left" => volume.left = value.parse().map_err(|e: ParseIntError| CmusError::UnknownError(e.to_string()))?,
|
||||||
"vol_right" => volume.right = value.parse().map_err(|e: ParseIntError| CmusError::UnknownError(e.to_string()))?,
|
"vol_right" => volume.right = value.parse().map_err(|e: ParseIntError| CmusError::UnknownError(e.to_string()))?,
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -86,7 +86,7 @@ impl FromStr for PlayerSettings {
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
repeat,
|
repeat,
|
||||||
shuffle,
|
shuffle,
|
||||||
aaa_mode: aa_mode,
|
aaa_mode,
|
||||||
volume,
|
volume,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue