From 79e10a221d027b78eb8c15fc19689d3d33df1e9e Mon Sep 17 00:00:00 2001 From: Sunli Date: Sat, 25 Jun 2022 10:23:48 +0800 Subject: [PATCH] Clippy --- src/registry/export_sdl.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/registry/export_sdl.rs b/src/registry/export_sdl.rs index fddb99b1..d6b2501a 100644 --- a/src/registry/export_sdl.rs +++ b/src/registry/export_sdl.rs @@ -386,13 +386,11 @@ fn export_description( let tab = if top_level { "" } else { "\t" }; let description = description.replace('"', r#"\""#); writeln!(sdl, "{}\"{}\"", tab, description).ok(); + } else if top_level { + writeln!(sdl, "\"\"\"\n{}\n\"\"\"", description).ok(); } else { - if top_level { - writeln!(sdl, "\"\"\"\n{}\n\"\"\"", description).ok(); - } else { - let description = description.replace('\n', "\n\t"); - writeln!(sdl, "\t\"\"\"\n\t{}\n\t\"\"\"", description).ok(); - } + let description = description.replace('\n', "\n\t"); + writeln!(sdl, "\t\"\"\"\n\t{}\n\t\"\"\"", description).ok(); } }