Skip to content

Commit

Permalink
Remove a deadlock in RustAdvLoggerDxe
Browse files Browse the repository at this point in the history
  • Loading branch information
joschock committed Nov 11, 2023
1 parent bff2cf3 commit e49cc2a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions AdvLoggerPkg/Crates/RustAdvancedLoggerDxe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ macro_rules! debugln {
#[macro_export]
macro_rules! function {
() => {{
fn f() {}
fn type_name_of<T>(_: T) -> &'static str {
core::any::type_name::<T>()
}
let name = type_name_of(f);
name.strip_suffix("::f").unwrap()
}}
fn f() {}
fn type_name_of<T>(_: T) -> &'static str {
core::any::type_name::<T>()
}
let name = type_name_of(f);
name.strip_suffix("::f").unwrap()
}};
}

#[cfg(test)]
Expand Down Expand Up @@ -316,4 +316,4 @@ mod tests {
debug!(DEBUG_VERBOSE, "This {:} {:} {:} test.\n", "is", "a", "DEBUG_VERBOSE");
debug!(DEBUG_ERROR, "{:}", "This is a DEBUG_ERROR test.\n");
}
}
}

0 comments on commit e49cc2a

Please sign in to comment.