-
Notifications
You must be signed in to change notification settings - Fork 444
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
Proofread some code/docs #1108
base: master
Are you sure you want to change the base?
Proofread some code/docs #1108
Conversation
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.
Wow, you caught a lot of mistakes! Nice. Some of these I'm not so sure about, particularly the ones with hyphens, and I'm unlikely to remain consistent with all of them in the future. But I'm not too worried about it.
- Yes, "escapeable" should just be "escapable." I just apparently don't know how to spell that word. (I suppose one could say I don't know how to spell a lot of words, haha, but I think a lot of these are typos.)
- "determinizing" seems fine to me? Not sure what the alternative is.
- "Padron" is a type of cigar. It's intentional. :-)
Otherwise just a few small nits and this should be good to go.
@@ -772,7 +772,7 @@ fn write_varu32(data: &mut Vec<u8>, mut n: u32) { | |||
/// | |||
/// https://developers.google.com/protocol-buffers/docs/encoding#varints | |||
fn read_varu32(data: &[u8]) -> (u32, usize) { | |||
// N.B. We can assume correctness here since we know that all varuints are |
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.
I think "varuints" is what I actually meant here.
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.
I suspect most people will automatically read "variants", defeating the purpose :) Can you think of another word for this, e.g. "var-u32"?
regex-automata/src/util/wire.rs
Outdated
@@ -370,7 +370,7 @@ pub(crate) fn alloc_aligned_buffer<T>(size: usize) -> (Vec<u8>, usize) { | |||
// NOTE: This is a kludge because there's no easy way to allocate a Vec<u8> | |||
// with an alignment guaranteed to be greater than 1. We could create a | |||
// Vec<u32>, but this cannot be safely transmuted to a Vec<u8> without | |||
// concern, since reallocing or dropping the Vec<u8> is UB (different |
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.
I think I meant "reallocing" here, as in "to call realloc." I suppose "reallocating" is close enough, but I think I like "reallocing" better? I don't feel strongly.
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.
ok, will revert it
Ok, i fixed them all, with the exception of |
* `escapeable` should be replaced by `escapable`, but it is part of a pub fn
@BurntSushi hi, any blockers for this? |
Possible TODOs (not blocking):
escapeable
should be replaced byescapable
-- too many occurrences to replacedeterminizing
is another weird one"Padron"
-- is that intentional?