docs: document everything, dedup existing docs#741
Conversation
|
|
||
| /// Rounds up `x` to the closest multiple of 32. If `x % 32 == 0` then `x` is returned. | ||
| #[inline] | ||
| pub(crate) fn next_multiple_of_32(x: usize) -> Option<usize> { |
There was a problem hiding this comment.
Moved to revm_primitives
There was a problem hiding this comment.
Related only to Interpreter so it was left there, does not make sense imo to move it to primitives
mattsse
left a comment
There was a problem hiding this comment.
love the additional docs,
what's the reason for dropping the _ from the unused references?
|
As this one is a bigger PR, would leave it after the release and alloy merge. |
Evalir
left a comment
There was a problem hiding this comment.
this is probably mergeable now!
| use core::fmt; | ||
|
|
||
| /// The EVM stack limit, in number of items. | ||
| pub const STACK_LIMIT: usize = 1024; |
There was a problem hiding this comment.
Related to the stack, soo imo stack.rs is a good place for it.
crates/primitives/src/constants.rs
Outdated
| pub const STACK_LIMIT: usize = 1024; | ||
|
|
||
| /// EVM call stack limit. | ||
| pub const CALL_STACK_LIMIT: u64 = 1024; |
There was a problem hiding this comment.
CALL_STACK_LIMIT is only used inside revm crate so this should've its place
|
@rakita I moved the constants and util to primitives because there were some duplicates, I think they make more sense since it has a constants and utils module and I felt they don't really belong in random modules of other crates. WDYT? |
If we had only one lib sure, if maybe there is an intention to be used somewhere else sure. Duplicates should of course be removed. |
#[doc(inline)]duplicates all docs so one has to be careful using it (fix(doc): Inline documentation of re-exports #560)pub mod x;andpub use x::*;is redundant and creates 2 paths from where an item can be imported, so I opted to keep the glob export.