-
Difference Between clone and to_owned methods in Rust
Sep 20, 2021
In this blog post I will try to give you some clues on a question that a lot of people are asking me when talking about Rust:
The f*ck is the difference between clone and to_owned methods?
They do the same sh*t, Rust is badly designed! -
Building Chekov - Part 1: Design the EventStore
Jun 17, 2020
Chekov
CQRS/ES have been trending topics for some times now and there are some pretty nice libraries out there to build application following these patterns. But I found myself missing some of those tools to build Rust applications for a while so I decided to try to fulfill this gap by implementing it myself.
In this blog series I will cover my way of building an OpenSource framework called
Chekov
. I will try to describe how I design and implement the whole thing. I will start from scratch, I will fail sometimes, but I will learn a lot and you too. I will try to cover as much part of the reflexion I have, feel free to ask for more details on Twitter or at the end of each blog post.But you may have a question:
What the f*ck is
Chekov
?Chekov
is a Rust framework to help people building CQRS/ES application. It aims to provide everything you need to dispatch a command, produce events and build projections. -
Why clippy doesnt report anything after update/cargo check and how to solve it
Apr 30, 2020
Clippy
is a nice tool to improve code quality on Rust projects but he has a little issue which is pretty annoying over time.When
clippy
run and display errors to fix and you fix a single one or you runcargo check
, the next timeclippy
run he will display no errors anymore. Weird right?Here’s a simple tricks to make it work again.
-
Cfg Test and Cargo Test a Missing Information
Oct 28, 2018
I’m currently working on a library and I want it battle tested. I don’t want to reach 100% code coverage but testing is part of the development workflow and moreover Rust natively provides testing and documentation facilities.
But, what’s the point about
#[cfg(test)]
? -
Cargo How to Display Print in Test Command
Sometime you try to understand why an assertion failed. It can be many things and you need some visibility to understand what’s wrong with your code.
By default cargo test prevent every
print
. To display it you just need to use this:$ cargo test -- --nocapture
Enjoy