-
Notifications
You must be signed in to change notification settings - Fork 183
refactor: rename 'script' parameters to 'path' in file loading functions #587
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
base: develop
Are you sure you want to change the base?
refactor: rename 'script' parameters to 'path' in file loading functions #587
Conversation
source/ports/rs_port/src/load.rs
Outdated
let script_as_pathbuf = PathBuf::from(script.as_ref()); | ||
for path in paths.into_iter() { | ||
let script_as_pathbuf = PathBuf::from(path.as_ref()); | ||
let script_as_str = script_as_pathbuf.to_str().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
binding names like this are still irrelevant. script_as_str
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since I'm not so familiar with the functionality of this module I need to ask, should I rename all the variable names containing script or scripts to be path or paths ? or only inside the functions originally mentioned in the issue and their inline documentation (from_file, from single file) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only from_file
from single file
👍
…ath and paths respectively
source/ports/rs_port/src/load.rs
Outdated
} | ||
|
||
c_script = cstring_enum!(script_as_str, MetaCallLoaderError)?; | ||
c_script = cstring_enum!(path_as_str, MetaCallLoaderError)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need this from c_script
to c_path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, I keep missing those 😅
…ath and paths respectively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks Aly @AlyAbdelmoneim
Description
Renamed the
script
parameter topath
(andscripts
topaths
) in the Rust port’s file loading functions for better naming consistency and clarity.This change improves readability by making it clear that these functions load files from paths, not scripts in memory.
Fixes #586
Type of change
Checklist:
make clang-format
and verified my code follows style guidelines.