-
Notifications
You must be signed in to change notification settings - Fork 100
Allow ref (&) parameters in contract fns #1535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 18 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
9ae1bd8
feat: allow using references in contract method's parameters
willemneal b5f535e
feat: add tests
willemneal a86e210
Merge branch 'main' into feat/ref_args
willemneal 0ad4395
allow refs on fn args
leighmcculloch d71c5d9
Merge branch 'feat/ref_args' into ref-arg-support
leighmcculloch 1f22342
undo unrelated changes
leighmcculloch 96cd0cb
update doc
leighmcculloch 435c5dc
fmt
leighmcculloch b8df882
fix mutability
leighmcculloch 617fab5
fix mutability
leighmcculloch bdcab09
Merge branch 'main' into ref-arg-support
leighmcculloch bebfa83
Merge branch 'main' into ref-arg-support
leighmcculloch f73900a
Merge branch 'main' into ref-arg-support
leighmcculloch adac134
update test_empty3 version to 23.0.2
leighmcculloch c0cbdbe
update expanded
leighmcculloch 40fd04b
Merge branch 'main' into ref-arg-support
leighmcculloch fc95876
refactor constructor to use ctor crate pattern
leighmcculloch 3e93212
rename helper functions for clarity and consistency
leighmcculloch 909a541
rename parameter from `i` to `p` in pat_unwrap_mut
leighmcculloch 5f8941b
refactor fn_arg_make_ref to use if let instead of match
leighmcculloch 498c1a7
remove unnecessary else branch in fn_arg_make_ref
leighmcculloch 7569b2f
null
leighmcculloch da24d24
null
leighmcculloch 13d7882
remove empty3 test contract and snapshots
leighmcculloch 00f01df
remove test_empty3 test case and generated files
leighmcculloch 2046b00
add lifetime parameter and mutable ref to get method
leighmcculloch c65f3e6
Merge branch 'main' into ref-arg-support
leighmcculloch 37f0b06
Merge branch 'main' into ref-arg-support
leighmcculloch b3a6c99
Merge branch 'main' into ref-arg-support
leighmcculloch 1d74fd7
Merge branch 'main' into ref-arg-support
leighmcculloch 10ca49f
add test for method with reference arguments
leighmcculloch d5e76f8
replace empty method with exec in test generics
leighmcculloch 04ab9d5
change contract method parameters from references to owned values
leighmcculloch 4960ace
add test for mutable function arguments
leighmcculloch f269160
rename test function from test_hello to test_calc
leighmcculloch 07b9193
rename test function from test_hello to test_calc
leighmcculloch 88cebf8
strip mutability from generated function arguments
leighmcculloch 432c270
refactor pat_unwrap_mut helper to strip mutability
leighmcculloch f066255
add test for mutable argument in contract function
leighmcculloch 9cb08f5
Merge branch 'i1605-add-mut-arg-test' into ref-arg-support
leighmcculloch 616dab7
disallow mutable references in contract function params
leighmcculloch 0ca7ca0
remove commented-out mutable reference validation
leighmcculloch 5fd0ce0
reorder contract methods in test
leighmcculloch 28de27b
extract fn arg mutable reference validation logic
leighmcculloch 858775a
Merge branch 'main' into ref-arg-support
leighmcculloch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.