Format code using 'cargo fmt'

This commit is contained in:
Atul Bhosale
2019-09-23 19:35:37 +07:00
parent 8207fdea40
commit 1273e2d52d
36 changed files with 8738 additions and 6375 deletions

View File

@@ -6,7 +6,7 @@ use prolog::instructions::*;
use prolog::iterators::*;
pub trait CompilationTarget<'a> {
type Iterator : Iterator<Item=TermRef<'a>>;
type Iterator: Iterator<Item = TermRef<'a>>;
fn iter(&'a Term) -> Self::Iterator;
@@ -43,8 +43,7 @@ impl<'a> CompilationTarget<'a> for FactInstruction {
FactInstruction::GetConstant(lvl, constant, reg)
}
fn to_structure(ct: ClauseType, arity: usize, reg: RegType) -> Self
{
fn to_structure(ct: ClauseType, arity: usize, reg: RegType) -> Self {
FactInstruction::GetStructure(ct, arity, reg)
}
@@ -59,7 +58,7 @@ impl<'a> CompilationTarget<'a> for FactInstruction {
fn is_void_instr(&self) -> bool {
match self {
&FactInstruction::UnifyVoid(_) => true,
_ => false
_ => false,
}
}
@@ -125,7 +124,7 @@ impl<'a> CompilationTarget<'a> for QueryInstruction {
fn is_void_instr(&self) -> bool {
match self {
&QueryInstruction::SetVoid(_) => true,
_ => false
_ => false,
}
}