Merge "aconfig: update error message in modify_parsed_flags_based_on_mode" into main am: 9cd08c66a4 am: 9a8d7f14f6
Original change: https://android-review.googlesource.com/c/platform/build/+/2883810
Change-Id: I48dace6736e187d6f16118d92cb9bbe96bede91c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tools/aconfig/src/commands.rs b/tools/aconfig/src/commands.rs
index cd53371..0c4f543 100644
--- a/tools/aconfig/src/commands.rs
+++ b/tools/aconfig/src/commands.rs
@@ -339,7 +339,7 @@
}
};
if modified_parsed_flags.is_empty() {
- bail!("{} library contains no exported flags.", codegen_mode);
+ bail!("{codegen_mode} library contains no {codegen_mode} flags");
}
Ok(modified_parsed_flags)
@@ -653,9 +653,6 @@
parsed_flags.parsed_flag.retain_mut(|pf| !pf.is_exported());
let error =
modify_parsed_flags_based_on_mode(parsed_flags, CodegenMode::Exported).unwrap_err();
- assert_eq!(
- format!("{} library contains no exported flags.", CodegenMode::Exported),
- format!("{:?}", error)
- );
+ assert_eq!("exported library contains no exported flags", format!("{:?}", error));
}
}