Skip to content

Commit 4c198e3

Browse files
committed
Remove log4rs workaround from bail macro
1 parent 6833150 commit 4c198e3

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/macros.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,8 @@
5050
/// # Ok(())
5151
/// # }
5252
/// ```
53-
#[cfg(doc)]
54-
#[macro_export]
55-
macro_rules! bail {
56-
($msg:literal $(,)?) => {
57-
return $crate::private::Err($crate::__anyhow!($msg))
58-
};
59-
($err:expr $(,)?) => {
60-
return $crate::private::Err($crate::__anyhow!($err))
61-
};
62-
($fmt:expr, $($arg:tt)*) => {
63-
return $crate::private::Err($crate::__anyhow!($fmt, $($arg)*))
64-
};
65-
}
66-
67-
// Workaround for crates that intentionally contained `{}` in an error message
68-
// prior to https://github.com/dtolnay/anyhow/issues/55 catching the missing
69-
// format args.
70-
#[cfg(not(doc))]
7153
#[macro_export]
7254
macro_rules! bail {
73-
// https://github.com/estk/log4rs/blob/afa0351af56b3bfd1780389700051d7e4d8bbdc9/src/append/rolling_file/policy/compound/roll/fixed_window.rs#L261
74-
("pattern does not contain `{}`") => {
75-
return $crate::private::Err($crate::Error::msg("pattern does not contain `{}`"))
76-
};
7755
($msg:literal $(,)?) => {
7856
return $crate::private::Err($crate::__anyhow!($msg))
7957
};

0 commit comments

Comments
 (0)