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

(RS-W1015) Found string literal in env functions #95

Closed
d10sfan opened this issue Sep 29, 2021 · 2 comments · Fixed by #98
Closed

(RS-W1015) Found string literal in env functions #95

d10sfan opened this issue Sep 29, 2021 · 2 comments · Fixed by #98
Labels
enhancement New feature or request Hacktoberfest

Comments

@d10sfan
Copy link
Member

d10sfan commented Sep 29, 2021

Description

Calls to the std::env functions that use string literals instead of a static strings can lead to bugs due to spelling errors.

Occurrences

There are 5 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/luxtorpeda-dev/luxtorpeda/issue/RS-W1015/occurrences/

@d10sfan d10sfan added enhancement New feature or request Hacktoberfest labels Sep 29, 2021
@dfireBird
Copy link
Contributor

dfireBird commented Oct 7, 2021

Does static string here mean something like this: static STRING: &str = "STRING"; in the global scope?

@d10sfan
Copy link
Member Author

d10sfan commented Oct 7, 2021

@dfireBird Yes, their recommendation was to do as you suggest. You can see an example here: https://deepsource.io/gh/luxtorpeda-dev/luxtorpeda/issue/RS-W1015/description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants