5
0
mirror of git://git.proxmox.com/git/proxmox-fuse.git synced 2024-12-22 17:36:00 +03:00
proxmox-fuse/examples/tmpfs/macros.rs
Wolfgang Bumiller b04f99dc37 examples: fix warnings from macros
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-03-04 09:29:51 +01:00

16 lines
368 B
Rust

macro_rules! io_format_err {
($($fmt:tt)*) => {
::std::io::Error::new(::std::io::ErrorKind::Other, format!($($fmt)*))
}
}
macro_rules! io_bail {
($($fmt:tt)*) => {{ return Err(io_format_err!($($fmt)*).into()); }}
}
macro_rules! io_return {
($errno:expr) => {{
return Err(::std::io::Error::from_raw_os_error($errno).into());
}};
}