---
title: Macro to_string
timestamp: 2024-01-17T09:30:01
author: szabgab
published: true
description: Sometimes I get tired typing in to_string, especially in test cases so I wrote this macro.
tags:
    - macro_rules!
    - macro
    - to_string
---

Sometimes I get tired typing in `to_string`, especially in test cases so I wrote this macro.

{% include file="examples/macro-to-string/src/main.rs" %}

I am a bit ambivalent as I don't like one-letter variables or functions name, but I want this to be short.

An besides I can search for `s!` if I am looking for all the uses.

