Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
sthiele committed Oct 5, 2023
1 parent 5116910 commit 808b0cd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -836,12 +836,10 @@ impl<'a> From<TheoryDefinition<'a>> for Statement<'a> {
pub struct Id<'a> {
ast: AST<'a>,
}

#[derive(Debug, Clone)]
pub struct Variable<'a> {
ast: AST<'a>,
}

impl<'a> Variable<'a> {
pub fn to_string(&self) -> Result<String, ClingoError> {
self.ast.to_string()
Expand Down
6 changes: 1 addition & 5 deletions src/ast_internals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,11 +742,7 @@ impl<'a> AST<'a> {
///
/// might set one of the following error codes:
/// - ::clingo_error_runtime
fn set_attribute_ast(
&self,
attribute: ASTAttribute,
value: AST,
) -> Result<(), ClingoError> {
fn set_attribute_ast(&self, attribute: ASTAttribute, value: AST) -> Result<(), ClingoError> {
if !unsafe {
clingo_ast_attribute_set_ast(self.ptr.as_ptr(), attribute as i32, value.ptr.as_ptr())
} {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ fn ast_literal() {
let gt = ComparisonOperator::GreaterThan;
let guard = guard(gt, term2).unwrap();
assert_eq!(guard.to_string().unwrap(), " > \"test\"");

let guards = [guard];
let comp = comparison(term3, &guards).unwrap();
assert_eq!(comp.to_string().unwrap(), "fun1(42,\"test\") > \"test\"");
Expand Down

0 comments on commit 808b0cd

Please sign in to comment.