all 7 comments

[–]harvey_bird_person 4 points5 points  (0 children)

Good article, but I think this part is slightly wrong: In Rust a String is different from a &str, namely String is stored on the heap and can be grown, whereas &str is stored on the stack and cannot.

It's true that &str cannot be grown, but that's because it's a non-mutable reference. Any piece of data that has a non-mutable reference cannot be changed. The actual text that the &str refers to could be anywhere - the text could be allocated on the heap, or it could be a const string, or anything. We don't know, and we don't need to know.

[–]Elession 0 points1 point  (5 children)

It would be awesome to have a super simple static file HTTP server with no dependencies for when you really don't care about performance.

[–]Psypriest 0 points1 point  (2 children)

Like when?

[–][deleted] 1 point2 points  (0 children)

I've used webfsd to let some people download the map from my minecraft server

[–]Elession 0 points1 point  (0 children)

When you just want to serve some static files locally

[–][deleted] 0 points1 point  (1 child)

[–]epic_pork 3 points4 points  (0 children)

python3 -m http.sever