Skip to content

Commit ae57768

Browse files
committed
Fix clippy issues
1 parent 72acca0 commit ae57768

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn main() -> glib::ExitCode {
1818
.build();
1919
app.add_main_option(
2020
"version",
21-
('v' as u8).into(),
21+
b'v'.into(),
2222
glib::OptionFlags::NONE,
2323
glib::OptionArg::None,
2424
"Prints version information",
@@ -48,7 +48,7 @@ fn lcmdline(_: &gtk::Application, cmd: &glib::VariantDict) -> i32 {
4848
-1
4949
}
5050

51-
fn cmdline(app: &gtk::Application, cmd: &gio::ApplicationCommandLine) -> i32 {
51+
fn cmdline(_app: &gtk::Application, cmd: &gio::ApplicationCommandLine) -> i32 {
5252
println!(
5353
"cmdline, {:?} {:?}",
5454
cmd.options_dict().end(),

src/settings.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
22

33
#[derive(Debug)]
44
pub struct Settings {
5-
opt: Opt,
5+
_opt: Opt,
66
}
77

88
#[derive(Debug, Serialize, Deserialize)]
@@ -43,7 +43,7 @@ fn debool<'de, D>(deserializer: D) -> Result<Option<bool>, D::Error> where D: se
4343
if buf == "1" {
4444
return Ok(Some(true));
4545
}
46-
return Ok(Some(false));
46+
Ok(Some(false))
4747
}
4848

4949
#[derive(Debug, Serialize, Deserialize)]
@@ -82,6 +82,6 @@ impl Settings {
8282
let f = std::fs::File::open(dir.join("settings.xml"))?;
8383
let f = std::io::BufReader::new(f);
8484
let xml: Opt = quick_xml::de::from_reader(f)?;
85-
Ok(Settings { opt: xml })
85+
Ok(Settings { _opt: xml })
8686
}
8787
}

0 commit comments

Comments
 (0)