Skip to content

Commit 815f6a6

Browse files
jrelvas-ipcsewnie
andcommitted
bus.go: declare portal inside of SessionBus struct literal (v2)
Co-authored-by: sewn <[email protected]> Signed-off-by: Jrelvas <[email protected]>
1 parent 907c231 commit 815f6a6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/bus/bus.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ func NewSession() *SessionBus {
1515
return &SessionBus{}
1616
}
1717

18-
portal := conn.Object("org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop")
19-
20-
session := &SessionBus{
18+
return &SessionBus{
2119
conn: conn,
22-
portal: portal,
20+
portal: conn.Object("org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop"),
2321
}
24-
25-
return session
2622
}

0 commit comments

Comments
 (0)