New answers tagged rust
5
votes
implementing a min/max Heap in rust
Unusual API
It's unusual for a heap API to be a key/value API, and even more unusual here is the fact that the "value" part is optional, so that some keys will be associated with a value, ...
2
votes
minitalk project using Rust | Communication between process using UNIX Signals
This code is racy.
It does not appear capable of reliably sending a bytestream.
map
...
2
votes
Rust implementation of fibers
I feel unqualified to critique a lot of this, but I will address what I feel I can.
Your FiberContext::get API is unsound:
...
0
votes
Accepted
A simple parser for bencoding format
A short, more general review since I'm not too experienced with Rust:
The contained type of BEncodingType::String should be changed from ...
2
votes
Accepted
ShareImage: Place Texts on Images to generate Social Media Preview Images
You clone the Vec<u8> unnecessarily
In each of the new() methods, you have an ...
2
votes
Accepted
Project Euler Problem 1: Multiples of 3 or 5
The implementation is far more complex than the problem calls for. Maybe that's practice for more complex problems?
You don't need to handle arguments, the problem has fixed parameters.
You don't need ...
2
votes
Accepted
Simple Rust Todo List with auto incrementing ID
NOTE 1) Should I specify the type, even when calling the new function on that type?
...
0
votes
Two sum sliding window challenge
I want to discuss the motivation behind the solution in the question and the process in which I found the solution posted through the question to be bad.
For brevity I will use the following notation:
...
1
vote
Accepted
Two sum sliding window challenge
Hmmm, interesting approach, consuming quadratic memory to save time.
In the copy-n-pasted Cargo.toml you probably intended "edition = 2023".
Informative comments
...
2
votes
Rust Network Interface
Adapting your code to supporting both IpV4 and IpV6 should be straightforward. Just use the IpAddr and SocketAddr types instead ...
Top 50 recent answers are included
Related Tags
rust × 833beginner × 201
performance × 69
algorithm × 52
programming-challenge × 40
parsing × 36
strings × 28
multithreading × 22
primes × 21
iterator × 21
reinventing-the-wheel × 20
file × 16
sorting × 15
error-handling × 15
linked-list × 14
sieve-of-eratosthenes × 13
game × 12
tree × 12
file-system × 12
vectors × 12
recursion × 11
console × 11
generics × 11
comparative-review × 10
cryptography × 10