Rust cheatsheet

Rust cheatsheet

I start to learn Rust programming language. This is a post where I collect tips and tricks about Rust

This post will be updated (I hope often :)

for z in (0..100).rev(){
  println!("{:?}", z);
}
x & 1 == 1;
let mut a = vec![1, 2, 3];
let mut b = vec![4, 5, 6];
a.append(&mut b);
let mut v = vec![1,3,10,2,5,3,6,1,8]
//sort is the key
v.sort();
v.dedup(); //[1,2,3,5,6,8,10] 
// let assume that path is PathBuff
path
  // we need into_os_string step because String is UTF-8 encoded,
  // but PathBuff might not be. For example on Windows
  .into_os_string()
  .into_string()
  .unwrap()

Rust Atomics and Locks by Mara Bos

Rust Atomics and Locks by Mara Bos

I remember that I wanted to read more fiction, but hear me out.

The Advent of Code 2023

The Advent of Code 2023

It is time to be honest, and say "I will not finish it". Come on, it is the middle of February.

YAMD 0.14.0 release

YAMD 0.14.0 release

YAMD stands for - Yet Another MarkDown (flavor) and is a simplified version of CommonMark.