Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–389 unchanged (389 lines)
390 serde_json::from_str(&acl_file).expect("failed to parse plugin manifest map")
391 } else {
392 Default::default()
393 };
394
395 let capabilities_file_path = out_dir.join(CAPABILITIES_FILE_NAME);
396 let capabilities = get_capabilities(
397 &config,
398 Some(&capabilities_file_path),
399 additional_capabilities.as_deref(),
400 )
401 .unwrap();
402
403 let resolved = Resolved::resolve(&acl, capabilities, target).expect("failed to resolve ACL");
404
…lines 405–487 unchanged (83 lines)

After

…lines 1–389 unchanged (389 lines)
390 serde_json::from_str(&acl_file).expect("failed to parse plugin manifest map")
391 } else {
392 Default::default()
393 };
394
395 let capabilities_file_path = out_dir.join(CAPABILITIES_FILE_NAME);
396 let capabilities_from_files = if capabilities_file_path.exists() {
397 let capabilities_json =
398 std::fs::read_to_string(&capabilities_file_path).expect("failed to read capabilities");
399 serde_json::from_str(&capabilities_json).expect("failed to parse capabilities")
400 } else {
401 Default::default()
402 };
403 let capabilities = get_capabilities(
404 &config,
405 capabilities_from_files,
406 additional_capabilities.as_deref(),
407 )
408 .unwrap();
409
410 let resolved = Resolved::resolve(&acl, capabilities, target).expect("failed to resolve ACL");
411
…lines 412–494 unchanged (83 lines)

Before

source_file
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "collections"
:: "::"
identifier "BTreeMap"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "convert"
:: "::"
identifier "identity"
; ";"
use_declaration
use "use"
scoped_use_list
scoped_identifier
identifier "std"
:: "::"
identifier "path"
:: "::"
use_list
{ "{"
identifier "Path"
, ","
identifier "PathBuf"
} "}"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "std"
:: "::"
use_list
{ "{"
scoped_identifier
identifier "ffi"
:: "::"
identifier "OsStr"
, ","
scoped_identifier
identifier "str"
:: "::"
identifier "FromStr"
} "}"
; ";"
use_declaration (+31 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "base64"
:: "::"
identifier "Engine"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "proc_macro2"
:: "::"
identifier "TokenStream"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "quote"
:: "::"
identifier "quote"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "sha2"
:: "::"
use_list
{ "{"
identifier "Digest"
, ","
identifier "Sha256"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "syn"
:: "::"
identifier "Expr"
; ";"
use_declaration (+84 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Necessary data needed by [`context_codegen`] to generate co"...
struct_item (+87 nodes collapsed)
function_item (+219 nodes collapsed)
function_item (+242 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "feature"
= "="
string_literal
" "\""
string_content "isolation"
" "\""
) ")"
] "]"
function_item (+352 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Build a `tauri::Context` for including in application code."...
function_item
visibility_modifier
pub "pub"
fn "fn"
identifier "context_codegen"
parameters
( "("
parameter
identifier "data"
: ":"
type_identifier "ContextData"
) ")"
-> "->"
generic_type
type_identifier "EmbeddedAssetsResult"
type_arguments
< "<"
type_identifier "TokenStream"
> ">"
block
{ "{"
let_declaration (+32 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "allow"
token_tree
( "("
identifier "unused_variables"
) ")"
] "]"
let_declaration
let "let"
identifier "running_tests"
= "="
identifier "test"
; ";"
let_declaration (+58 nodes collapsed)
let_declaration (+73 nodes collapsed)
let_declaration (+74 nodes collapsed)
expression_statement (+27 nodes collapsed)
let_declaration (+324 nodes collapsed)
let_declaration
let "let"
identifier "out_dir"
= "="
try_expression
call_expression
identifier "ensure_out_dir"
arguments
( "("
) ")"
? "?"
; ";"
let_declaration (+295 nodes collapsed)
let_declaration (+184 nodes collapsed)
let_declaration (+62 nodes collapsed)
let_declaration (+78 nodes collapsed)
let_declaration (+74 nodes collapsed)
let_declaration (+130 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "target_os"
= "="
string_literal
" "\""
string_content "macos"
" "\""
) ")"
] "]"
let_declaration (+481 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "not"
token_tree
( "("
identifier "target_os"
= "="
string_literal
" "\""
string_content "macos"
" "\""
) ")"
) ")"
] "]"
let_declaration
let "let"
identifier "maybe_embed_plist_block"
= "="
macro_invocation
identifier "quote"
! "!"
token_tree
( "("
) ")"
; ";"
let_declaration (+413 nodes collapsed)
let_declaration
let "let"
identifier "acl_file_path"
= "="
call_expression
field_expression
identifier "out_dir"
. "."
field_identifier "join"
arguments
( "("
identifier "ACL_MANIFESTS_FILE_NAME"
) ")"
; ";"
let_declaration (+90 nodes collapsed)
let_declaration
let "let"
identifier "capabilities_file_path"
= "="
call_expression
field_expression
identifier "out_dir"
. "."
field_identifier "join"
arguments
( "("
identifier "CAPABILITIES_FILE_NAME"
) ")"
; ";"
let_declaration
let "let"
identifier "capabilities"
= "="
call_expression
field_expression
call_expression
identifier "get_capabilities"
arguments
( "("
reference_expression
& "&"
identifier "config"
, ","
call_expression
identifier "Some"
arguments
( "("
reference_expression
& "&"
identifier "capabilities_file_path"
) ")"
, ","
call_expression
field_expression
identifier "additional_capabilities"
. "."
field_identifier "as_deref"
arguments
( "("
) ")"
, ","
) ")"
. "."
field_identifier "unwrap"
arguments
( "("
) ")"
; ";"
let_declaration (+31 nodes collapsed)
let_declaration (+31 nodes collapsed)
let_declaration (+24 nodes collapsed)
let_declaration (+145 nodes collapsed)
let_declaration (+53 nodes collapsed)
let_declaration (+82 nodes collapsed)
call_expression (+119 nodes collapsed)
} "}"
function_item (+105 nodes collapsed)

After

source_file
line_comment
// "//"
line_comment
// "//"
line_comment
// "//"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "collections"
:: "::"
identifier "BTreeMap"
; ";"
use_declaration
use "use"
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "convert"
:: "::"
identifier "identity"
; ";"
use_declaration
use "use"
scoped_use_list
scoped_identifier
identifier "std"
:: "::"
identifier "path"
:: "::"
use_list
{ "{"
identifier "Path"
, ","
identifier "PathBuf"
} "}"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "std"
:: "::"
use_list
{ "{"
scoped_identifier
identifier "ffi"
:: "::"
identifier "OsStr"
, ","
scoped_identifier
identifier "str"
:: "::"
identifier "FromStr"
} "}"
; ";"
use_declaration (+31 nodes collapsed)
use_declaration
use "use"
scoped_identifier
identifier "base64"
:: "::"
identifier "Engine"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "proc_macro2"
:: "::"
identifier "TokenStream"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "quote"
:: "::"
identifier "quote"
; ";"
use_declaration
use "use"
scoped_use_list
identifier "sha2"
:: "::"
use_list
{ "{"
identifier "Digest"
, ","
identifier "Sha256"
} "}"
; ";"
use_declaration
use "use"
scoped_identifier
identifier "syn"
:: "::"
identifier "Expr"
; ";"
use_declaration (+84 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Necessary data needed by [`context_codegen`] to generate co"...
struct_item (+87 nodes collapsed)
function_item (+219 nodes collapsed)
function_item (+242 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "feature"
= "="
string_literal
" "\""
string_content "isolation"
" "\""
) ")"
] "]"
function_item (+352 nodes collapsed)
line_comment
// "//"
outer_doc_comment_marker
/ "/"
doc_comment " Build a `tauri::Context` for including in application code."...
function_item
visibility_modifier
pub "pub"
fn "fn"
identifier "context_codegen"
parameters
( "("
parameter
identifier "data"
: ":"
type_identifier "ContextData"
) ")"
-> "->"
generic_type
type_identifier "EmbeddedAssetsResult"
type_arguments
< "<"
type_identifier "TokenStream"
> ">"
block
{ "{"
let_declaration (+32 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "allow"
token_tree
( "("
identifier "unused_variables"
) ")"
] "]"
let_declaration
let "let"
identifier "running_tests"
= "="
identifier "test"
; ";"
let_declaration (+58 nodes collapsed)
let_declaration (+73 nodes collapsed)
let_declaration (+74 nodes collapsed)
expression_statement (+27 nodes collapsed)
let_declaration (+324 nodes collapsed)
let_declaration
let "let"
identifier "out_dir"
= "="
try_expression
call_expression
identifier "ensure_out_dir"
arguments
( "("
) ")"
? "?"
; ";"
let_declaration (+295 nodes collapsed)
let_declaration (+184 nodes collapsed)
let_declaration (+62 nodes collapsed)
let_declaration (+78 nodes collapsed)
let_declaration (+74 nodes collapsed)
let_declaration (+130 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "target_os"
= "="
string_literal
" "\""
string_content "macos"
" "\""
) ")"
] "]"
let_declaration (+481 nodes collapsed)
attribute_item
# "#"
[ "["
attribute
identifier "cfg"
token_tree
( "("
identifier "not"
token_tree
( "("
identifier "target_os"
= "="
string_literal
" "\""
string_content "macos"
" "\""
) ")"
) ")"
] "]"
let_declaration
let "let"
identifier "maybe_embed_plist_block"
= "="
macro_invocation
identifier "quote"
! "!"
token_tree
( "("
) ")"
; ";"
let_declaration (+413 nodes collapsed)
let_declaration
let "let"
identifier "acl_file_path"
= "="
call_expression
field_expression
identifier "out_dir"
. "."
field_identifier "join"
arguments
( "("
identifier "ACL_MANIFESTS_FILE_NAME"
) ")"
; ";"
let_declaration (+90 nodes collapsed)
let_declaration
let "let"
identifier "capabilities_file_path"
= "="
call_expression
field_expression
identifier "out_dir"
. "."
field_identifier "join"
arguments
( "("
identifier "CAPABILITIES_FILE_NAME"
) ")"
; ";"
let_declaration
let "let"
identifier "capabilities_from_files"
= "="
if_expression
if "if"
call_expression
field_expression
identifier "capabilities_file_path"
. "."
field_identifier "exists"
arguments
( "("
) ")"
block
{ "{"
let_declaration
let "let"
identifier "capabilities_json"
= "="
call_expression
field_expression
call_expression
scoped_identifier
scoped_identifier
identifier "std"
:: "::"
identifier "fs"
:: "::"
identifier "read_to_string"
arguments
( "("
reference_expression
& "&"
identifier "capabilities_file_path"
) ")"
. "."
field_identifier "expect"
arguments
( "("
string_literal
" "\""
string_content "failed to read capabilities"
" "\""
) ")"
; ";"
call_expression
field_expression
call_expression
scoped_identifier
identifier "serde_json"
:: "::"
identifier "from_str"
arguments
( "("
reference_expression
& "&"
identifier "capabilities_json"
) ")"
. "."
field_identifier "expect"
arguments
( "("
string_literal
" "\""
string_content "failed to parse capabilities"
" "\""
) ")"
} "}"
else_clause
else "else"
block
{ "{"
call_expression
scoped_identifier
identifier "Default"
:: "::"
identifier "default"
arguments
( "("
) ")"
} "}"
; ";"
let_declaration
let "let"
identifier "capabilities"
= "="
call_expression
field_expression
call_expression
identifier "get_capabilities"
arguments
( "("
reference_expression
& "&"
identifier "config"
, ","
identifier "capabilities_from_files"
, ","
call_expression
field_expression
identifier "additional_capabilities"
. "."
field_identifier "as_deref"
arguments
( "("
) ")"
, ","
) ")"
. "."
field_identifier "unwrap"
arguments
( "("
) ")"
; ";"
let_declaration (+31 nodes collapsed)
let_declaration (+31 nodes collapsed)
let_declaration (+24 nodes collapsed)
let_declaration (+145 nodes collapsed)
let_declaration (+53 nodes collapsed)
let_declaration (+82 nodes collapsed)
call_expression (+119 nodes collapsed)
} "}"
function_item (+105 nodes collapsed)