[#1] Updated the library to compile for Rust 2021.

This was mostly just a change to the cargo edition target.

I also went and removed the weave requirement. It was just a function
wrapper around the ? operator that was new at that time. As this has
become very common place I just swapped the code over to it.
This commit is contained in:
2025-02-19 20:07:49 -05:00
parent 51a8a23a65
commit 04ecb4072f
2 changed files with 8 additions and 11 deletions

View File

@ -186,7 +186,7 @@ macro_rules! c_flags
let mut first: bool;
// Push the left bracket onto the string.
weave::attempt!(write!(f, "{}", '{'));
write!(f, "{}", '{')?;
// Handle checking each flag to see if it
// is part of this flag.
@ -198,11 +198,11 @@ macro_rules! c_flags
// then add an OR symbol.
if first == false
{
weave::attempt!(write!(f, " | "));
write!(f, " | ")?;
}
// Push the flags name onto the string.
weave::attempt!(write!(f, "{}", stringify!($flag)));
write!(f, "{}", stringify!($flag))?;
first = false;
}
)+
@ -211,7 +211,7 @@ macro_rules! c_flags
if first == true
{
// Put a space in the string.
weave::attempt!(write!(f, " "));
write!(f, " ")?;
}
// Push the right bracket onto the string