New answers tagged

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, ...
Matthieu M.'s user avatar
  • 4,629
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 ...
J_H's user avatar
  • 13.8k
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: ...
kmdreko's user avatar
  • 271
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 ...
Setris's user avatar
  • 1,458
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 ...
Chayim Refael Friedman's user avatar
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 ...
harold's user avatar
  • 8,724
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? ...
Winston Ewert's user avatar
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: ...
PrancingCrabulon's user avatar
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 ...
J_H's user avatar
  • 13.8k
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 ...
Winston Ewert's user avatar

Top 50 recent answers are included