diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index c60e60a..b1b86c6 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -14,4 +14,4 @@ permissions: jobs: rust-ci: - uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@d135b05bfc647d0c0fbfedc7e80f37ea50f49236 + uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@8dc2bf039d1ff0372d650895c46bea7fbaec68ff diff --git a/src/abi/mod.rs b/src/abi/mod.rs index cf5e1f8..dcba159 100644 --- a/src/abi/mod.rs +++ b/src/abi/mod.rs @@ -506,8 +506,8 @@ mod tests { #[test] fn test_custom_distribution_valid() { - let d = - Distribution::new_custom("mixture(0.5, normal(0,1), normal(5,2))".to_string()).expect("TODO: handle error"); + let d = Distribution::new_custom("mixture(0.5, normal(0,1), normal(5,2))".to_string()) + .expect("TODO: handle error"); assert_eq!(d.kind(), "custom"); } diff --git a/src/codegen/codegen.rs b/src/codegen/codegen.rs index 43e4024..96f7c34 100644 --- a/src/codegen/codegen.rs +++ b/src/codegen/codegen.rs @@ -63,7 +63,8 @@ fn emit_header(code: &mut String, project_name: &str) { writeln!(code, "// Project: {}", project_name).expect("TODO: handle error"); writeln!(code, "// SPDX-License-Identifier: MPL-2.0").expect("TODO: handle error"); writeln!(code).expect("TODO: handle error"); - writeln!(code, "module {} where", sanitize_identifier(project_name)).expect("TODO: handle error"); + writeln!(code, "module {} where", sanitize_identifier(project_name)) + .expect("TODO: handle error"); writeln!(code).expect("TODO: handle error"); } @@ -78,7 +79,8 @@ fn emit_distribution_declarations(code: &mut String, variables: &[ParsedVariable let btype = betlang_type(&var.distribution); writeln!(code, "/// {} — {}", var.name, info.description).expect("TODO: handle error"); - writeln!(code, "/// Sampling method: {}", info.sampling_method).expect("TODO: handle error"); + writeln!(code, "/// Sampling method: {}", info.sampling_method) + .expect("TODO: handle error"); writeln!(code, "/// Support: {}", info.support).expect("TODO: handle error"); writeln!( code, @@ -113,7 +115,8 @@ fn emit_ternary_helpers(code: &mut String, variables: &[ParsedVariable]) { writeln!(code).expect("TODO: handle error"); writeln!(code, "/// Kleene strong three-valued AND").expect("TODO: handle error"); - writeln!(code, "let ternary_and(a: Ternary, b: Ternary) -> Ternary =").expect("TODO: handle error"); + writeln!(code, "let ternary_and(a: Ternary, b: Ternary) -> Ternary =") + .expect("TODO: handle error"); writeln!(code, " match (a, b) with").expect("TODO: handle error"); writeln!(code, " | (False, _) | (_, False) -> False").expect("TODO: handle error"); writeln!(code, " | (True, True) -> True").expect("TODO: handle error"); @@ -121,7 +124,8 @@ fn emit_ternary_helpers(code: &mut String, variables: &[ParsedVariable]) { writeln!(code).expect("TODO: handle error"); writeln!(code, "/// Kleene strong three-valued OR").expect("TODO: handle error"); - writeln!(code, "let ternary_or(a: Ternary, b: Ternary) -> Ternary =").expect("TODO: handle error"); + writeln!(code, "let ternary_or(a: Ternary, b: Ternary) -> Ternary =") + .expect("TODO: handle error"); writeln!(code, " match (a, b) with").expect("TODO: handle error"); writeln!(code, " | (True, _) | (_, True) -> True").expect("TODO: handle error"); writeln!(code, " | (False, False) -> False").expect("TODO: handle error"); @@ -191,7 +195,8 @@ fn emit_entry_point(code: &mut String, variables: &[ParsedVariable], config: &Ab } writeln!(code, " }}").expect("TODO: handle error"); - writeln!(code, " report(results, confidence={})", config.confidence).expect("TODO: handle error"); + writeln!(code, " report(results, confidence={})", config.confidence) + .expect("TODO: handle error"); } /// Sanitize a project name into a valid Betlang module identifier.