-
Notifications
You must be signed in to change notification settings - Fork 35
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(starknet_class_manager): builder for test storage #4011
Conversation
Graphite Automations"Yair - Auto-assign" took an action on this PR • (02/06/25)1 assignee was added to this PR based on Yair's automation. |
87b2ecd
to
e4dbae0
Compare
3a7d96a
to
5ce501a
Compare
e4dbae0
to
29ea78b
Compare
5ce501a
to
5652afb
Compare
29ea78b
to
9eb9e9e
Compare
5652afb
to
d67d15f
Compare
9eb9e9e
to
c499508
Compare
d67d15f
to
3af4df1
Compare
e474961
to
dc72e95
Compare
3af4df1
to
e305bd4
Compare
e305bd4
to
85e6a08
Compare
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.
Reviewed 2 of 5 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @yair-starkware)
crates/starknet_class_manager/src/test_utils.rs
line 21 at r2 (raw file):
let persistent_root = persistent_root_handle.path().to_path_buf(); let config = FsClassStorageConfig { persistent_root,
For consistency with path_prefix
.
Suggestion:
let config = FsClassStorageConfig {
persistent_root: persistent_root_handle.path().to_path_buf(),
crates/starknet_class_manager/src/test_utils.rs
line 44 at r2 (raw file):
} pub fn build(self) -> (FsClassStorage, FsClassStorageConfig, Option<FileHandles>) {
Shouldn't build
method of builder return the object it builds (here, FsClassStorage
)?
Code quote:
build
crates/starknet_class_manager/src/test_utils.rs
line 47 at r2 (raw file):
let Self { config, handles } = self; let class_hash_storage = ClassHashStorage::new(config.class_hash_storage_config.clone()).unwrap();
Unwrap config
insead?
Code quote:
config.class_hash_storage_config.clone()
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @elintul)
crates/starknet_class_manager/src/test_utils.rs
line 21 at r2 (raw file):
Previously, elintul (Elin) wrote…
For consistency with
path_prefix
.
Done
crates/starknet_class_manager/src/test_utils.rs
line 44 at r2 (raw file):
Previously, elintul (Elin) wrote…
Shouldn't
build
method of builder return the object it builds (here,FsClassStorage
)?
It returns it, along with the final config and the file handles
crates/starknet_class_manager/src/test_utils.rs
line 47 at r2 (raw file):
Previously, elintul (Elin) wrote…
Unwrap
config
insead?
The config is not an option.
I need to clone it because the constructor moves it, and I need to return it to the user.
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.
Reviewed 2 of 5 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @elintul)
No description provided.