I am reading the rust for rustaceans book, but it’s not the end of all, I need to implement my learning. What could be the best, short and crisp way to utilise most of async and concurrent feature in a small application?
My goal is to get confident enough that I can build/contribute to something like #pingora or a database like #quadrant
If you want to update the value of a String, it is more efficient to recycle the existing allocation with clear and write* instead of reallocating with format! ♻️
#Divan shows that the method with format! has one allocation while the other one doesn't 😃
@mo8it I wonder what would happen if the updated string is longer than the old one, for the above example, if you take the number 144 to be randomised u32 (0 to u32::MAX) , that would be more general use case and accurate benchmark too
While implementing dependency injection in #rust using its trait system, we rediscovered the “implied bounds” problem which was already in discussion from 2014 but not yet implemented.
Done some refactoring on my little #rust project. The "?" operator for handling Result errors is particularly elegant and allowed me to untangle some nested match/if statements.