From 99f188fab90b294351ff224f846a3cc106a89ac5 Mon Sep 17 00:00:00 2001 From: Avery Wagar Date: Mon, 26 Jul 2021 16:30:28 -0700 Subject: [PATCH] Move from .write() to .write_all() --- src/context.rs | 2 +- templates/music/cfg_music.ht | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/context.rs b/src/context.rs index eb6f1d5..8291847 100644 --- a/src/context.rs +++ b/src/context.rs @@ -113,7 +113,7 @@ impl AddonManager { file_path.push(path); let mut file = tokio::fs::File::create(file_path).await?; - file.write(string.as_bytes()).await?; + file.write_all(string.as_bytes()).await?; } diff --git a/templates/music/cfg_music.ht b/templates/music/cfg_music.ht index 36ee2c4..6233762 100644 --- a/templates/music/cfg_music.ht +++ b/templates/music/cfg_music.ht @@ -7,6 +7,14 @@ class CfgPatches { }; }; +class CfgMusicClasses { + {{#each classes}} + class {{this.class_name}} { + displayName = "{{this.display_name}}"; + }; + {{/each}} +}; + class CfgMusic { tracks[]={ {{{track_list}}} @@ -22,11 +30,3 @@ class CfgMusic { {{/each}} }; - -class CfgMusicClasses { - {{#each classes}} - class {{this.class_name}} { - displayName = "{{this.display_name}}"; - }; - {{/each}} -};