[#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:
parent
51a8a23a65
commit
04ecb4072f
11
Cargo.toml
11
Cargo.toml
@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "binding"
|
||||
version = "0.1.0"
|
||||
authors = ["Jason Travis Smith <Myrddin@CyberMagesLLC.com>"]
|
||||
authors = ["Jason Travis Smith <Myrddin@CyberMages.tech>"]
|
||||
description = "Defines macros and functions used when binding to C libraries."
|
||||
license = ""
|
||||
repository = "https://gitlab.com/CyberMages/Core/binding.git"
|
||||
repository = "https://workshop.cybermages.tech/CyberMages/binding.git"
|
||||
documentation = ""
|
||||
keywords = ["binding", "c types", "c enums", "c flags", "c strings"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
[features]
|
||||
@ -16,7 +16,4 @@ use_std = ["scribe/use_std"]
|
||||
|
||||
|
||||
[dependencies.scribe]
|
||||
git = "ssh://git@gitlab.com/CyberMages/Core/scribe.git"
|
||||
|
||||
[dependencies.weave]
|
||||
git = "ssh://git@gitlab.com/CyberMages/Core/weave.git"
|
||||
git = "ssh://gitea@workshop.cybermages.tech:3022/CyberMages/scribe.git"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user