mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
fix cargo clippy complaints after clone! fix
This commit is contained in:
parent
eeff527291
commit
e25639f77b
7 changed files with 19 additions and 29 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1530,9 +1530,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "idna"
|
name = "idna"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
|
checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"matches",
|
"matches",
|
||||||
"unicode-bidi",
|
"unicode-bidi",
|
||||||
|
|
|
@ -79,17 +79,11 @@ mod imp {
|
||||||
) {
|
) {
|
||||||
match pspec.get_name() {
|
match pspec.get_name() {
|
||||||
"locked" => {
|
"locked" => {
|
||||||
let locked = value
|
let locked = value.get().unwrap().unwrap();
|
||||||
.get()
|
|
||||||
.expect("type conformity checked by `Object::set_property`")
|
|
||||||
.unwrap();
|
|
||||||
self.locked.set(locked);
|
self.locked.set(locked);
|
||||||
}
|
}
|
||||||
"can-be-locked" => {
|
"can-be-locked" => {
|
||||||
let can_be_locked = value
|
let can_be_locked = value.get().unwrap().unwrap();
|
||||||
.get()
|
|
||||||
.expect("type conformity checked by `Object::set_property`")
|
|
||||||
.unwrap();
|
|
||||||
self.can_be_locked.set(can_be_locked);
|
self.can_be_locked.set(can_be_locked);
|
||||||
}
|
}
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
|
@ -139,7 +133,7 @@ mod imp {
|
||||||
win.providers().refilter();
|
win.providers().refilter();
|
||||||
None
|
None
|
||||||
})).unwrap();
|
})).unwrap();
|
||||||
preferences.connect_notify_local(Some("has-set-password"), clone!(@weak app => move |preferences, prop| {
|
preferences.connect_notify_local(Some("has-set-password"), clone!(@weak app => move |preferences, _| {
|
||||||
let state = preferences.has_set_password();
|
let state = preferences.has_set_password();
|
||||||
app.set_can_be_locked(state);
|
app.set_can_be_locked(state);
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -143,6 +143,11 @@ impl AccountRow {
|
||||||
.flags(glib::BindingFlags::DEFAULT | glib::BindingFlags::SYNC_CREATE)
|
.flags(glib::BindingFlags::DEFAULT | glib::BindingFlags::SYNC_CREATE)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
self.account()
|
||||||
|
.bind_property("name", &*self_.name_label, "tooltip-text")
|
||||||
|
.flags(glib::BindingFlags::DEFAULT | glib::BindingFlags::SYNC_CREATE)
|
||||||
|
.build();
|
||||||
|
|
||||||
self.account()
|
self.account()
|
||||||
.bind_property("name", &*self_.name_entry, "text")
|
.bind_property("name", &*self_.name_entry, "text")
|
||||||
.flags(glib::BindingFlags::DEFAULT | glib::BindingFlags::SYNC_CREATE)
|
.flags(glib::BindingFlags::DEFAULT | glib::BindingFlags::SYNC_CREATE)
|
||||||
|
|
|
@ -88,10 +88,7 @@ mod imp {
|
||||||
) {
|
) {
|
||||||
match pspec.get_name() {
|
match pspec.get_name() {
|
||||||
"has-set-password" => {
|
"has-set-password" => {
|
||||||
let has_set_password = value
|
let has_set_password = value.get().unwrap().unwrap();
|
||||||
.get()
|
|
||||||
.expect("type conformity checked by `Object::set_property`")
|
|
||||||
.unwrap();
|
|
||||||
self.has_set_password.set(has_set_password);
|
self.has_set_password.set(has_set_password);
|
||||||
}
|
}
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
|
|
|
@ -121,10 +121,7 @@ mod imp {
|
||||||
) {
|
) {
|
||||||
match pspec.get_name() {
|
match pspec.get_name() {
|
||||||
"has-set-password" => {
|
"has-set-password" => {
|
||||||
let has_set_password = value
|
let has_set_password = value.get().unwrap().unwrap();
|
||||||
.get()
|
|
||||||
.expect("type conformity checked by `Object::set_property`")
|
|
||||||
.unwrap();
|
|
||||||
self.has_set_password.set(has_set_password);
|
self.has_set_password.set(has_set_password);
|
||||||
}
|
}
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
|
|
|
@ -123,10 +123,10 @@ impl ProvidersDialog {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let search_btn = &*self_.search_btn;
|
let search_btn = &*self_.search_btn;
|
||||||
search_entry.connect_search_started(clone!(@weak search_btn => move |entry| {
|
search_entry.connect_search_started(clone!(@weak search_btn => move |_| {
|
||||||
search_btn.set_active(true);
|
search_btn.set_active(true);
|
||||||
}));
|
}));
|
||||||
search_entry.connect_stop_search(clone!(@weak search_btn => move |entry| {
|
search_entry.connect_stop_search(clone!(@weak search_btn => move |_| {
|
||||||
search_btn.set_active(false);
|
search_btn.set_active(false);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -196,8 +196,7 @@ impl ProvidersDialog {
|
||||||
.connect_local(
|
.connect_local(
|
||||||
"updated",
|
"updated",
|
||||||
false,
|
false,
|
||||||
clone!(@weak self as dialog => move |args| {
|
clone!(@weak self as dialog => move |_| {
|
||||||
let provider = args.get(1).unwrap().get::<Provider>().unwrap().unwrap();
|
|
||||||
dialog.set_view(View::List);
|
dialog.set_view(View::List);
|
||||||
dialog.emit("changed", &[]).unwrap();
|
dialog.emit("changed", &[]).unwrap();
|
||||||
None
|
None
|
||||||
|
@ -356,9 +355,7 @@ mod row {
|
||||||
) {
|
) {
|
||||||
match pspec.get_name() {
|
match pspec.get_name() {
|
||||||
"provider" => {
|
"provider" => {
|
||||||
let provider = value
|
let provider = value.get().unwrap();
|
||||||
.get()
|
|
||||||
.expect("type conformity checked by `Object::set_property`");
|
|
||||||
self.provider.replace(provider);
|
self.provider.replace(provider);
|
||||||
}
|
}
|
||||||
_ => unimplemented!(),
|
_ => unimplemented!(),
|
||||||
|
|
|
@ -212,7 +212,7 @@ impl Window {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
self_.providers.model().connect_items_changed(
|
self_.providers.model().connect_items_changed(
|
||||||
clone!(@weak self as win, @weak app => move |model, _,_,_| {
|
clone!(@weak self as win, @weak app => move |_, _,_,_| {
|
||||||
// We do a check on set_view to ensure we always use the right page
|
// We do a check on set_view to ensure we always use the right page
|
||||||
if !app.locked() {
|
if !app.locked() {
|
||||||
win.set_view(View::Accounts);
|
win.set_view(View::Accounts);
|
||||||
|
@ -245,10 +245,10 @@ impl Window {
|
||||||
let text = entry.get_text().to_string();
|
let text = entry.get_text().to_string();
|
||||||
providers.search(text);
|
providers.search(text);
|
||||||
}));
|
}));
|
||||||
search_entry.connect_search_started(clone!(@weak search_btn => move |entry| {
|
search_entry.connect_search_started(clone!(@weak search_btn => move |_| {
|
||||||
search_btn.set_active(true);
|
search_btn.set_active(true);
|
||||||
}));
|
}));
|
||||||
search_entry.connect_stop_search(clone!(@weak search_btn => move |entry| {
|
search_entry.connect_stop_search(clone!(@weak search_btn => move |_| {
|
||||||
search_btn.set_active(false);
|
search_btn.set_active(false);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue