> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# rust-format-in-loop

> Calling format! inside a Rust loop allocates a new String on every iteration.

## What it flags

Calling format! inside a Rust loop allocates a new String on every iteration.

## Example

Calling `format!` inside a Rust loop allocates a new `String` on every iteration.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "rust-format-in-loop": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.