Remove Rust nightly API

This commit is contained in:
sxyazi 2025-06-18 19:18:50 +08:00
parent e05498d7ec
commit 624eb4fb25
No known key found for this signature in database

View file

@ -3,15 +3,7 @@ macro_rules! try_format {
($($arg:tt)*) => {{
use std::fmt::Write;
fn inner(args: std::fmt::Arguments<'_>) -> Result<String, std::fmt::Error> {
if let Some(s) = args.as_str() {
Ok(s.to_owned())
} else {
let mut output = String::new();
output.write_fmt(args).map(|_| output)
}
}
inner(format_args!($($arg)*))
let mut output = String::new();
output.write_fmt(format_args!($($arg)*)).map(|_| output)
}}
}