this post was submitted on 17 Nov 2023
16 points (94.4% liked)
Rust
5938 readers
4 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Please don’t use pointers in Rust!
Anyways, my feedback:
Your http module just wraps another inline module, this is unnecessary. Usually inline modules are only useful for tests. Your readline implementation doesn’t account for systems with two-character line endings (Windows and DOS) and I'm also unclear on why you need that for stdin.
Concerning http in the standard library, Rust has learned from the mess in python, which has multiple implementations in the standard library that are all outdated but can’t be updated due to needing to handle backwards compatibility. Rust only has the basic stuff there, and handles other needs by external dependencies, which are managed by a great package manager (again, unlike python) on crates.io.
ah the IO module is left over from the initial CLI calculator. Will have to clean that out at some point.
And the inline server module is also left over from when I was writing everything in the same file first before splitting out.
Good catches! Thanks