use reference

This commit is contained in:
yggverse 2024-12-08 00:24:16 +02:00
parent 2823345f8b
commit 080c2fc51a
2 changed files with 4 additions and 8 deletions

View File

@ -37,11 +37,7 @@ impl List {
match profile.identity.gemini.database.records() {
Ok(identities) => {
for identity in identities {
match Item::new_profile_identity_gemini_id(
profile.clone(),
identity.id,
auth_url,
) {
match Item::new_profile_identity_gemini_id(&profile, identity.id, auth_url) {
Ok(item) => list_store.append(&item),
Err(_) => todo!(),
}

View File

@ -54,7 +54,7 @@ impl Item {
}
pub fn new_profile_identity_gemini_id(
profile: Rc<Profile>,
profile: &Rc<Profile>,
profile_identity_gemini_id: i64,
auth_url: &str,
) -> Result<Self, Error> {
@ -68,7 +68,7 @@ impl Item {
// Extract certificate details from PEM string
Ok(ref pem) => match TlsCertificate::from_pem(pem) {
// 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
Ok(ref scope) => Ok(Object::builder()
.property("value", profile_identity_gemini_id)
@ -87,7 +87,7 @@ impl Item {
.property(
"is_active",
is_active::new_for_profile_identity_gemini_id(
&profile,
profile,
profile_identity_gemini_id,
auth_url,
),