mirror of
https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
synced 2026-08-09 07:09:12 +02:00
- Add crates/uad-cli for command-line interface - Extract shared logic into crates/uad-core - Separate GUI into crates/uad-gui - Enable code reuse across components
18 lines
472 B
Rust
18 lines
472 B
Rust
/// Helper macro to handle broken pipe errors gracefully
|
|
/// When piping to commands like `head`, we want to exit cleanly when the pipe closes
|
|
#[macro_export]
|
|
macro_rules! println_or_exit {
|
|
() => {
|
|
let _ = writeln!(std::io::stdout());
|
|
};
|
|
($($arg:tt)*) => {
|
|
let _ = writeln!(std::io::stdout(), $($arg)*);
|
|
};
|
|
}
|
|
|
|
#[macro_export]
|
|
macro_rules! print_or_exit {
|
|
($($arg:tt)*) => {
|
|
let _ = write!(std::io::stdout(), $($arg)*);
|
|
};
|
|
}
|