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

refacto(air/layout): move compute_program_hash in utils.rs #59

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tdelabro
Copy link

Tell me if it's fine for it to leave in utils.rs

@Okm165
Copy link
Contributor

Okm165 commented Dec 20, 2024

I think that better idea is to not create another file lets move this function to mod.rs there are some common utils there already so it fits in imo
https://github.com/tdelabro/swiftness/blob/factorize-compute-program-hash/crates/air/src/layout/mod.rs#L114

@Okm165 Okm165 self-assigned this Dec 20, 2024
@Okm165 Okm165 added the enhancement New feature or request label Dec 20, 2024
@tdelabro tdelabro force-pushed the factorize-compute-program-hash branch from 61e4e5d to 92d9957 Compare December 20, 2024 10:18
@tdelabro
Copy link
Author

tdelabro commented Dec 20, 2024

@Okm165 done

Sidenote: more than half of this file is Error definition. Maybe moving those into their own error.rs could make sense

Copy link
Contributor

@Okm165 Okm165 left a comment

Choose a reason for hiding this comment

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

LGTM
write comment here when u finalized everything i will merge

@tdelabro
Copy link
Author

@Okm165 I moved the errors to their own file.

Btw, is there a reason why you prefer to duplicate the error structs and use both thiserror and thiserror-nostd, rather than using only the latter but with or without its std feature: https://docs.rs/crate/thiserror-no-std/latest/source/Cargo.toml.orig

@Okm165
Copy link
Contributor

Okm165 commented Dec 20, 2024

@tdelabro No particular reason
I wasn’t aware of this feature in thiserror-nostd. Feel free to improve it if you'd like!

@tdelabro
Copy link
Author

@Okm165 I will on a separated PR as it spans changes across multiple crates

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

Successfully merging this pull request may close these issues.

2 participants