mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 09:10:08 +00:00
use reference
This commit is contained in:
parent
2823345f8b
commit
080c2fc51a
@ -37,11 +37,7 @@ impl List {
|
|||||||
match profile.identity.gemini.database.records() {
|
match profile.identity.gemini.database.records() {
|
||||||
Ok(identities) => {
|
Ok(identities) => {
|
||||||
for identity in identities {
|
for identity in identities {
|
||||||
match Item::new_profile_identity_gemini_id(
|
match Item::new_profile_identity_gemini_id(&profile, identity.id, auth_url) {
|
||||||
profile.clone(),
|
|
||||||
identity.id,
|
|
||||||
auth_url,
|
|
||||||
) {
|
|
||||||
Ok(item) => list_store.append(&item),
|
Ok(item) => list_store.append(&item),
|
||||||
Err(_) => todo!(),
|
Err(_) => todo!(),
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ impl Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_profile_identity_gemini_id(
|
pub fn new_profile_identity_gemini_id(
|
||||||
profile: Rc<Profile>,
|
profile: &Rc<Profile>,
|
||||||
profile_identity_gemini_id: i64,
|
profile_identity_gemini_id: i64,
|
||||||
auth_url: &str,
|
auth_url: &str,
|
||||||
) -> Result<Self, Error> {
|
) -> Result<Self, Error> {
|
||||||
@ -68,7 +68,7 @@ impl Item {
|
|||||||
// Extract certificate details from PEM string
|
// Extract certificate details from PEM string
|
||||||
Ok(ref pem) => match TlsCertificate::from_pem(pem) {
|
Ok(ref pem) => match TlsCertificate::from_pem(pem) {
|
||||||
// Collect certificate scopes for item
|
// Collect certificate scopes for item
|
||||||
Ok(ref certificate) => match scope(&profile, profile_identity_gemini_id) {
|
Ok(ref certificate) => match scope(profile, profile_identity_gemini_id) {
|
||||||
// Ready to build `Item` GObject
|
// Ready to build `Item` GObject
|
||||||
Ok(ref scope) => Ok(Object::builder()
|
Ok(ref scope) => Ok(Object::builder()
|
||||||
.property("value", profile_identity_gemini_id)
|
.property("value", profile_identity_gemini_id)
|
||||||
@ -87,7 +87,7 @@ impl Item {
|
|||||||
.property(
|
.property(
|
||||||
"is_active",
|
"is_active",
|
||||||
is_active::new_for_profile_identity_gemini_id(
|
is_active::new_for_profile_identity_gemini_id(
|
||||||
&profile,
|
profile,
|
||||||
profile_identity_gemini_id,
|
profile_identity_gemini_id,
|
||||||
auth_url,
|
auth_url,
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user