Skip to content

Commit 72c2f18

Browse files
committed
context2: Fix namespacing of Context
1 parent d3571f2 commit 72c2f18

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

examples/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::env;
66
use std::num::ParseIntError;
77
use std::path::{Path, PathBuf};
88

9-
use quick_error::{Context, ResultExt};
9+
use quick_error::ResultExt;
1010

1111
quick_error! {
1212
#[derive(Debug)]

src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,11 @@ macro_rules! quick_error {
668668
{ context($cvar:ident: $ctyp:ty, $fvar:ident: $ftyp:ty)
669669
-> ($( $texpr:expr ),*) $( $tail:tt )*}
670670
) => {
671-
impl<'a> From<Context<$ctyp, $ftyp>> for $name {
672-
fn from(Context($cvar, $fvar): Context<$ctyp, $ftyp>) -> $name {
671+
impl<'a> From<$crate::Context<$ctyp, $ftyp>> for $name {
672+
fn from(
673+
$crate::Context($cvar, $fvar): $crate::Context<$ctyp, $ftyp>)
674+
-> $name
675+
{
673676
$name::$item($( $texpr ),*)
674677
}
675678
}

0 commit comments

Comments
 (0)