Skip to content

refactor: simplify logic of readFileAsString, remove redundant exists check - #16573

Open
b1tflyyyy wants to merge 2 commits into
hyprwm:mainfrom
b1tflyyyy:refactor/readFileAsString
Open

b1tflyyyy wants to merge 2 commits into
hyprwm:mainfrom
b1tflyyyy:refactor/readFileAsString

Conversation

@b1tflyyyy

Copy link
Copy Markdown
Contributor

Describe your PR, what does it fix/add?

Simplified logic of readFileAsString function, removed redundant exists check, changed function signature from std::string to std::filesystem::path

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

No.

Did you use AI in any way shape or form in the making of this PR? If so, detail how you used it. (Undisclosed AI use is a violation of the AI Policy and is punishable)

No.

Is it ready for merging, or does it need work?

Ready for merging. Tested locally on my machine.

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you should move all callers to Hyprutils::File::readFileAsString instead

@b1tflyyyy

Copy link
Copy Markdown
Contributor Author

you should move all callers to Hyprutils::File::readFileAsString instead

So, I should use Hyprutils::File::readFileAsString function from here instead of NFsUtils::readFileAsString implementation?

And I need to replace all NFsUtils::readFileAsString calls with Hyprutils::File::readFileAsString?
In this case we can remove NFsUtils::readFileAsString implementation, am I right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants