Tour of Rust Table of Contents

Returning Nothing

If no return type is specified for a function, it returns an empty tuple, also known as a unit.

An empty tuple is represented by ().

Using () is uncommon, but will come up often enough that it's good to know whats happening.