Skip to content

Commit

Permalink
Ignore lib.rs because codecov is seriously getting that file wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 16, 2024
1 parent a056c50 commit 516b47d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ignore:
- "rust/src/lib.rs" # codecov seriously screws this one up, and thinks it has >1k lines despite having ~60

component_management:
default_rules: # default rules that will be inherited by all components
statuses:
Expand Down
2 changes: 1 addition & 1 deletion rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub use crate::include::utils::{Answer,get_answer};
#[cfg(any(target_arch="wasm32", target_arch="wasm64"))]
#[wasm_bindgen]
pub fn run_problem(n: usize) -> JsValue {
let Some((_, problem_function, _)) = get_problem(n) else { panic!() };
let Some((_, problem_function, _)) = get_problem(n) else { return JsValue::UNDEFINED };
let answer = problem_function();
return match answer {
Answer::String(e) => JsValue::from_str(&e),
Expand Down

0 comments on commit 516b47d

Please sign in to comment.