Skip to content

Commit b5721dd

Browse files
committed
Reference Vipers in macros
1 parent e212949 commit b5721dd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assert.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
#[macro_export]
88
macro_rules! assert_keys {
99
($account_a: expr, $account_b: expr $(,)?) => {
10-
assert_keys_eq!($account_a, $account_b, "key mismatch")
10+
$crate::assert_keys_eq!($account_a, $account_b, "key mismatch")
1111
};
1212
($account_a: expr, $account_b: expr, $msg: expr $(,)?) => {
13-
assert_keys_eq!($account_a, $account_b, $msg)
13+
$crate::assert_keys_eq!($account_a, $account_b, $msg)
1414
};
1515
}
1616

@@ -158,7 +158,7 @@ macro_rules! assert_keys_eq {
158158
msg!(stringify!($account_a != $account_b));
159159
msg!("Left: {}", __account_a);
160160
msg!("Right: {}", __account_b);
161-
throw_err!($err);
161+
$crate::throw_err!($err);
162162
}
163163
};
164164
}
@@ -209,7 +209,7 @@ macro_rules! assert_keys_neq {
209209
msg!(stringify!($account_a == $account_b));
210210
msg!("Left: {}", __account_a);
211211
msg!("Right: {}", __account_b);
212-
throw_err!($err);
212+
$crate::throw_err!($err);
213213
}
214214
};
215215
}
@@ -324,7 +324,7 @@ macro_rules! throw_err {
324324
throw_err!(crate::ErrorCode::$error);
325325
};
326326
($error:expr $(,)?) => {
327-
log_code_location!();
327+
$crate::log_code_location!();
328328
return Err($error.into());
329329
};
330330
}
@@ -401,7 +401,7 @@ macro_rules! unwrap_opt {
401401
($option:expr, $err:expr, $msg: expr $(,)?) => {
402402
$option.ok_or_else(|| -> ProgramError {
403403
msg!("Option unwrap failed: {:?}", $err);
404-
log_code_location!();
404+
$crate::log_code_location!();
405405
$crate::VipersError::OptionUnwrapFailed.into()
406406
})?
407407
};

0 commit comments

Comments
 (0)