fix(utils): incorrect ToTokens impl for Capability (#9782)

This commit is contained in:
Lucas Fernandes Nogueira 2024-05-14 21:52:05 -03:00 committed by GitHub
parent e713ceb75d
commit be95d8d37c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-utils": patch:bug
---
Fixes the `ToTokens` implementation for `Capability`.

View File

@ -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);
@ -196,6 +197,7 @@ mod build {
remote,
local,
windows,
webviews,
permissions,
platforms
);