You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constBINARY_MATCHES:[(&str,&str);24] = [// Global array, so needs an explicit length
I hate that we have to keep track of how much is in there for the global array. I think the only reason I did it was to put it into another file, so they need to be globals for it to work.
Instead we could maybe put the matches into a separate file in another format and parse it, and count the lines to see how many there are when defining the array. Easier to keep track of then.
What do you think?
The text was updated successfully, but these errors were encountered:
Yeah, having those binary matches defined in a separate configuration file would certainly be preferable. They're tuples of a normal string and a raw string. Not sure how you can read text from a file and have it interpreted as a raw string (with the \x replacements executed). That's the only hard part. The two strings could just be tab-separated on the same line.
I've been wondering if it's possible to improve this at all:
portlurker/src/main.rs
Line 18 in 6a629fd
I hate that we have to keep track of how much is in there for the global array. I think the only reason I did it was to put it into another file, so they need to be globals for it to work.
Instead we could maybe put the matches into a separate file in another format and parse it, and count the lines to see how many there are when defining the array. Easier to keep track of then.
What do you think?
The text was updated successfully, but these errors were encountered: