Skip to content
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

Rename HirFunction::unsafe_from_expr to HirFunction::from_expr_unchecked #812

Closed
kevaundray opened this issue Feb 11, 2023 · 2 comments · Fixed by #823
Closed

Rename HirFunction::unsafe_from_expr to HirFunction::from_expr_unchecked #812

kevaundray opened this issue Feb 11, 2023 · 2 comments · Fixed by #823
Labels
compiler frontend `noirc_frontend` crate enhancement New feature or request good first issue Good for newcomers refactor

Comments

@kevaundray
Copy link
Contributor

Problem

The word unsafe here is being used to mean unchecked. Since unsafe has a particular meaning in Rust, we should be careful not to cause confusion when using it.

Solution

Change unsafe word to unchecked

Thoughts welcome on bikeshedding, ie we could do HirFunction::from_expr_unchecked or HirFunction::unchecked_from_expr or something else; the core of this issue is to remove the unsafe keyword

Alternatives considered

Additional context

@kevaundray kevaundray added enhancement New feature or request good first issue Good for newcomers compiler frontend `noirc_frontend` crate refactor labels Feb 11, 2023
@DreamerChaserHAH
Copy link
Contributor

DreamerChaserHAH commented Feb 12, 2023

Three Result

Found three results to replace. May I replace it?

@kevaundray
Copy link
Contributor Author

Three Result

Found three results to replace. May I replace it?

Thanks for tentatively opening up the PR for this :)

kevaundray pushed a commit that referenced this issue Feb 12, 2023
…cked_from_expr" (#823)

* Updated Internal Function Name

As per this issue #812

Renamed

HirFunction::unsafe_from_expr
to

HirFunction::unchecked_from_expr

* Removed Comment as per code reviewer
@Savio-Sou Savio-Sou added this to Noir Feb 13, 2023
@Savio-Sou Savio-Sou removed this from Noir Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler frontend `noirc_frontend` crate enhancement New feature or request good first issue Good for newcomers refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants