Skip to content

Commit

Permalink
fix for no-std mode
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Lodder <redmike7@gmail.com>
  • Loading branch information
mikelodder7 committed Oct 1, 2024
1 parent 73318b2 commit 6c8c65c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions oqs/src/kem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ macro_rules! implement_kems {
#[test]
fn test_from_str() {
let algo = Algorithm::$kem;
let name = algo.to_string();
let name = algo.name();
let res = name.parse::<Algorithm>();
if res.is_err() {
eprintln!("Failed to parse: {}", name);
assert!(false, "Failed to parse: {:?}", name);
}
let algo2 = res.unwrap();
assert_eq!(algo, algo2);
Expand Down
4 changes: 2 additions & 2 deletions oqs/src/sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ macro_rules! implement_sigs {
#[test]
fn test_from_str() {
let algo = Algorithm::$sig;
let name = algo.to_string();
let name = algo.name();
let res = name.parse::<Algorithm>();
if res.is_err() {
eprintln!("Failed to parse: {}", name);
assert!(false, "Failed to parse: {:?}", name);
}
let algo2 = res.unwrap();
assert_eq!(algo, algo2);
Expand Down

0 comments on commit 6c8c65c

Please sign in to comment.