From 53c8590a40a4618d6e938e2eadf2183e8521faa0 Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Sun, 20 Jan 2019 18:50:43 -0500 Subject: [PATCH] The c_flags macro now uses the attempt macro instead of the old try macro. --- Cargo.toml | 3 +++ src/c_flags.rs | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7d3f6f3..1123ff0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,3 +17,6 @@ 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" diff --git a/src/c_flags.rs b/src/c_flags.rs index 9c72df9..4dda8a8 100644 --- a/src/c_flags.rs +++ b/src/c_flags.rs @@ -186,7 +186,7 @@ macro_rules! c_flags let mut first: bool; // Push the left bracket onto the string. - try!(write!(f, "{}", '{')); + weave::attempt!(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 { - try!(write!(f, " | ")); + weave::attempt!(write!(f, " | ")); } // Push the flags name onto the string. - try!(write!(f, "{}", stringify!($flag))); + weave::attempt!(write!(f, "{}", stringify!($flag))); first = false; } )+ @@ -211,7 +211,7 @@ macro_rules! c_flags if first == true { // Put a space in the string. - try!(write!(f, " ")); + weave::attempt!(write!(f, " ")); } // Push the right bracket onto the string