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
Improve the code by reducing unnecessary abstractions.
This was pointed out by a user (Plecra) on Reddit
His comment:
My main recommendation would be to reduce your abstractions. The FileType trait isn't necessary - you only need a function that maps file types to headers (&'static [u8]), and another that can check them against a buffer. Other than that, there are a few nice std APIs that can help clean things up - iterator methods, ascii equality, etc.
The text was updated successfully, but these errors were encountered:
Improve the code by reducing unnecessary abstractions.
This was pointed out by a user (Plecra) on Reddit
His comment:
The text was updated successfully, but these errors were encountered: