Merge pull request #242 from dtolnay/stdwrite
Fix access to `write!` macro when `thiserror` is not in scope
This commit is contained in:
commit
f6dc5e54e2
|
@ -197,7 +197,7 @@ impl ToTokens for Display<'_> {
|
|||
let fmt = &self.fmt;
|
||||
let args = &self.args;
|
||||
tokens.extend(quote! {
|
||||
thiserror::__private::write!(__formatter, #fmt #args)
|
||||
std::write!(__formatter, #fmt #args)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -252,6 +252,4 @@ pub mod __private {
|
|||
pub use crate::display::{DisplayAsDisplay, PathAsDisplay};
|
||||
#[cfg(provide_any)]
|
||||
pub use crate::provide::ThiserrorProvide;
|
||||
|
||||
pub use std::write;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue