Density of a where clause.
-- **Default value**: `"CompressedIfEmpty"`
+- **Default value**: `"Vertical"`
- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
-#### `"CompressedIfEmpty"` (default):
+#### `"Vertical"` (default):
```rust
trait Lorem {
fn ipsum<Dolor>(dolor: Dolor) -> Sit
- where Dolor: Eq;
+ where Dolor: Eq;
fn ipsum<Dolor>(dolor: Dolor) -> Sit
- where
- Dolor: Eq,
+ where Dolor: Eq
{
// body
}
}
```
-#### `"Compressed"`:
+**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
+
+#### `"CompressedIfEmpty"`:
```rust
trait Lorem {
where Dolor: Eq;
fn ipsum<Dolor>(dolor: Dolor) -> Sit
- where Dolor: Eq {
+ where
+ Dolor: Eq,
+ {
// body
}
}
```
-#### `"Tall"`:
+#### `"Compressed"`:
```rust
trait Lorem {
fn ipsum<Dolor>(dolor: Dolor) -> Sit
- where
- Dolor: Eq;
+ where Dolor: Eq;
fn ipsum<Dolor>(dolor: Dolor) -> Sit
- where
- Dolor: Eq,
- {
+ where Dolor: Eq {
// body
}
}
```
-**Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
-
-#### `"Vertical"`:
+#### `"Tall"`:
```rust
trait Lorem {
fn ipsum<Dolor>(dolor: Dolor) -> Sit
- where Dolor: Eq;
+ where
+ Dolor: Eq;
fn ipsum<Dolor>(dolor: Dolor) -> Sit
- where Dolor: Eq
+ where
+ Dolor: Eq,
{
// body
}
}
```
-**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
+**Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).