Commit d4def5dc authored by azban's avatar azban
Browse files

komodo: temporary patch fix for build after rustc 1.9.2

There was a breaking change in rustc 1.9.2 which caused the komodo build to fail. Include that patch for now until it is in a release that can be updated
parent 98d6950e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -17,6 +17,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
    hash = "sha256-dLBgdcrIp5QM2TVIa86qX7m1c5n+qOIQJtqJPGvIZ+0=";
  };

  # Temporary fix to get build to pass until https://github.com/moghtech/komodo/pull/1122
  patches = [
    ./rustc-1_9_2-fixes.patch
  ];

  cargoHash = "sha256-jf/Jp28g3inGn5jQp3cACdhl//tbXTMc1vP1K3g/CyQ=";

  # disable for check. document generation is fail
+52 −0
Original line number Diff line number Diff line
diff --git a/bin/core/src/alert/discord.rs b/bin/core/src/alert/discord.rs
index 427227d..6d19678 100644
--- a/bin/core/src/alert/discord.rs
+++ b/bin/core/src/alert/discord.rs
@@ -230,14 +230,13 @@ pub async fn send_alert(
       )
     }
     AlertData::Custom { message, details } => {
-      format!(
-        "{level} | {message}{}",
-        if details.is_empty() {
-          format_args!("")
-        } else {
-          format_args!("\n{details}")
-        }
-      )
+      let details_str = if details.is_empty() {
+        String::new()
+      } else {
+        format!("\n{details} f")
+      };
+
+      format!("{level} | {message}{details_str}")
     }
     AlertData::None {} => Default::default(),
   };
diff --git a/bin/core/src/alert/mod.rs b/bin/core/src/alert/mod.rs
index 9eba5da..1f51ac2 100644
--- a/bin/core/src/alert/mod.rs
+++ b/bin/core/src/alert/mod.rs
@@ -474,14 +474,13 @@ fn standard_alert_content(alert: &Alert) -> String {
       )
     }
     AlertData::Custom { message, details } => {
-      format!(
-        "{level} | {message}{}",
-        if details.is_empty() {
-          format_args!("")
-        } else {
-          format_args!("\n{details}")
-        }
-      )
+      let details_str = if details.is_empty() {
+        String::new()
+      } else {
+        format!("\n{details}")
+      };
+
+      format!("{level} | {message}{details_str}")
     }
     AlertData::None {} => Default::default(),
   }