Skip to content

Commit

Permalink
Merge pull request #242 from dtolnay/stdwrite
Browse files Browse the repository at this point in the history
Fix access to `write!` macro when `thiserror` is not in scope
  • Loading branch information
dtolnay committed Jul 7, 2023
2 parents 305be4a + cab9fec commit f6dc5e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion impl/src/attr.rs
Expand Up @@ -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)
});
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Expand Up @@ -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;
}

0 comments on commit f6dc5e5

Please sign in to comment.