Blog posts

4 posts tagged with #rust

  1. How to Initialize Vector in Rust

    November 12, 2022
    In Rust, there are a couple of ways to initialize Vector. Vec::new() Vec::new() returns an empty vector. You can initialize a new empty vector and then pushing…
  2. Tuple with a Single Value in Rust

    November 11, 2022
    In Rust, tuples can be used to have different types of values as a container. Array does not allow you to have different types of elements instead. When Tuple …
  3. Wrapping Integers in Rust

    November 10, 2022
    In Rust, integers can be wrapped to avoid panicking during runtime. Checking operations Let's think the following example. The following source code panicks, b…
  4. Integer Literals Suffix in Rust

    November 09, 2022
    In Rust, a suffix for Integer literals indicates their type. For example, all of the following is 10, but with different integer types. Let's imagine to add tw…