File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change 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]
7254macro_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 } ;
You can’t perform that action at this time.
0 commit comments