komodo: temporary patch fix for build after rustc 1.9.2 (#499634)

This commit is contained in:
Yohann Boniface 2026-03-18 22:54:38 +00:00 committed by GitHub
commit f27b06d07e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 57 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1,52 @@
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(),
}