mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Remove Rust nightly API
This commit is contained in:
parent
e05498d7ec
commit
624eb4fb25
1 changed files with 2 additions and 10 deletions
|
|
@ -3,15 +3,7 @@ macro_rules! try_format {
|
||||||
($($arg:tt)*) => {{
|
($($arg:tt)*) => {{
|
||||||
use std::fmt::Write;
|
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();
|
let mut output = String::new();
|
||||||
output.write_fmt(args).map(|_| output)
|
output.write_fmt(format_args!($($arg)*)).map(|_| output)
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inner(format_args!($($arg)*))
|
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue