Skip to content

Commit be95d8d

Browse files
authored
fix(utils): incorrect ToTokens impl for Capability (#9782)
1 parent e713ceb commit be95d8d

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-utils": patch:bug
3+
---
4+
5+
Fixes the `ToTokens` implementation for `Capability`.

‎core/tauri-utils/src/acl/capability.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,10 @@ mod build {
182182
fn to_tokens(&self, tokens: &mut TokenStream) {
183183
let identifier = str_lit(&self.identifier);
184184
let description = str_lit(&self.description);
185-
let remote = &self.remote;
185+
let remote = opt_lit(self.remote.as_ref());
186186
let local = self.local;
187187
let windows = vec_lit(&self.windows, str_lit);
188+
let webviews = vec_lit(&self.webviews, str_lit);
188189
let permissions = vec_lit(&self.permissions, identity);
189190
let platforms = opt_vec_lit(self.platforms.as_ref(), identity);
190191

@@ -196,6 +197,7 @@ mod build {
196197
remote,
197198
local,
198199
windows,
200+
webviews,
199201
permissions,
200202
platforms
201203
);

0 commit comments

Comments
 (0)