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

refactor: remove unnecessary string hashes #815

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hamirmahal
Copy link
Contributor

Breaking Changes

This change is backward compatible.

Changes

  • This removes unnecessary string hashes to improve readability.

Copy link
Contributor Author

@hamirmahal hamirmahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@billy1624 are you open to this pull request?

Comment on lines 910 to 921
r#"SELECT "aspect""#,
r#"FROM "glyph""#,
r#"WHERE IFNULL("aspect", 0) > 2"#,
r#"ORDER BY CASE"#,
r"ORDER BY CASE",
r#"WHEN "id"=4 THEN 0"#,
r#"WHEN "id"=5 THEN 1"#,
r#"WHEN "id"=1 THEN 2"#,
r#"WHEN "id"=3 THEN 3"#,
r#"ELSE 4 END,"#,
r"ELSE 4 END,",
r#""glyph"."aspect" ASC"#,
]
.join(" ")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the above changes.
While I think most removal are fine when they're clearly not necessary, this bits look inconsistent with the surrounding lines?

Can you revert the changes where it is in a vec of string and the other lines still need r#?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're welcome. I reverted the changes in specific spots to make it more consistent.

@hamirmahal hamirmahal force-pushed the refactor/remove-unnecessary-string-hashes branch from 9d464d8 to dd86f38 Compare October 7, 2024 17:25
@hamirmahal hamirmahal force-pushed the refactor/remove-unnecessary-string-hashes branch from dd86f38 to 65deaee Compare October 7, 2024 17:30
@hamirmahal hamirmahal requested a review from tyt2y3 October 7, 2024 17:41
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I'd probably not change this file as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I reverted the changes to it.

@hamirmahal hamirmahal requested a review from tyt2y3 October 8, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants