Skip to content

Commit

Permalink
fix(utils): incorrect ToTokens impl for Capability (#9782)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 15, 2024
1 parent e713ceb commit be95d8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-capability-totokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-utils": patch:bug
---

Fixes the `ToTokens` implementation for `Capability`.
4 changes: 3 additions & 1 deletion core/tauri-utils/src/acl/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ mod build {
fn to_tokens(&self, tokens: &mut TokenStream) {
let identifier = str_lit(&self.identifier);
let description = str_lit(&self.description);
let remote = &self.remote;
let remote = opt_lit(self.remote.as_ref());
let local = self.local;
let windows = vec_lit(&self.windows, str_lit);
let webviews = vec_lit(&self.webviews, str_lit);
let permissions = vec_lit(&self.permissions, identity);
let platforms = opt_vec_lit(self.platforms.as_ref(), identity);

Expand All @@ -196,6 +197,7 @@ mod build {
remote,
local,
windows,
webviews,
permissions,
platforms
);
Expand Down

0 comments on commit be95d8d

Please sign in to comment.