Skip to content

Commit

Permalink
Cleaned up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mattraneri committed Mar 4, 2020
1 parent b78f56a commit 86ef42f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 73,4 @@ include/

# ignore rust build artifacts
libaris/src/main/rust/target/
libaris/src/main/rust/.vscode/launch.json
4 changes: 2 additions & 2 deletions libaris/src/main/rust/src/bin/auto_grader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,7 @@ use libaris::proofs::lined_proof::LinedProof;
fn validate_recursive<P: Proof>(proof: &P, line: P::Reference) -> Result<(), (P::Reference, ProofCheckError<P::Reference, P::SubproofReference>)>
where P::Reference:Debug, P::SubproofReference:Debug {
use ProofCheckError::*;
use frunk::Coproduct::{self, Inl, Inr};
use frunk::Coproduct::{Inl, Inr};
let mut q = vec![line];

// lookup returns either expr or Justification. if it returns the expr, it's done.
Expand All @@ -33,7 33,7 @@ where P::Reference:Debug, P::SubproofReference:Debug {
match line {
None => { return Err((r.clone(), LineDoesNotExist(r.clone()))); },
Some(Inl(_)) => {},
Some(Inr(Inl(Justification(conclusion, rule, deps, sdeps)))) => {
Some(Inr(Inl(Justification(_, _, deps, sdeps)))) => {
q.extend(deps);

for sdep in sdeps.iter() {
Expand Down
2 changes: 1 addition & 1 deletion libaris/src/main/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 64,7 @@ pub mod java_interop {
/// Wraps a Rust function, converting both Result::Err and panic into instances of Java's RuntimeException.
/// Please use this on all native methods, otherwise a Rust panic/unwrap will crash the Java UI instead of popping a dialog box with the message.
pub fn with_thrown_errors<A, F: FnOnce(&JNIEnv) -> jni::errors::Result<A> UnwindSafe>(env: &JNIEnv, f: F) -> A {
use std::panic::{take_hook, set_hook, PanicInfo, Location};
use std::panic::{take_hook, set_hook, PanicInfo};
let old_hook = take_hook();
let (tx, rx) = std::sync::mpsc::channel::<String>();
let mtx = std::sync::Mutex::new(tx);
Expand Down
4 changes: 2 additions & 2 deletions libaris/src/main/rust/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 817,7 @@ impl RuleT for Equivalence {
fn num_deps(&self) -> Option<usize> { Some(1) } // all equivalence rules rewrite a single statement
fn num_subdeps(&self) -> Option<usize> { Some(0) }
fn check<P: Proof>(self, p: &P, conclusion: Expr, deps: Vec<P::Reference>, _sdeps: Vec<P::SubproofReference>) -> Result<(), ProofCheckError<P::Reference, P::SubproofReference>> {
use ProofCheckError::*; use Equivalence::*;
use Equivalence::*;


match self {
Expand Down Expand Up @@ -860,7 860,7 @@ impl RuleT for ConditionalEquivalence {
fn num_deps(&self) -> Option<usize> { Some(1) } // all equivalence rules rewrite a single statement
fn num_subdeps(&self) -> Option<usize> { Some(0) }
fn check<P: Proof>(self, p: &P, conclusion: Expr, deps: Vec<P::Reference>, _sdeps: Vec<P::SubproofReference>) -> Result<(), ProofCheckError<P::Reference, P::SubproofReference>> {
use ProofCheckError::*; use ConditionalEquivalence::*;
use ConditionalEquivalence::*;
match self {
Complement => check_by_rewrite_rule(p, deps, conclusion, false, &CONDITIONAL_COMPLEMENT_RULES),
Identity => check_by_rewrite_rule(p, deps, conclusion, false, &CONDITIONAL_IDENTITY_RULES),
Expand Down

0 comments on commit 86ef42f

Please sign in to comment.