diff --git a/z3/src/ast.rs b/z3/src/ast.rs index 0a847817..ffe87f06 100644 --- a/z3/src/ast.rs +++ b/z3/src/ast.rs @@ -932,8 +932,14 @@ impl<'ctx> Real<'ctx> { pub fn approx(&self, precision: usize) -> ::std::string::String { let s = unsafe { - CStr::from_ptr(Z3_get_numeral_decimal_string(self.ctx.z3_ctx, self.z3_ast, precision as _)) - }.to_str().unwrap(); + CStr::from_ptr(Z3_get_numeral_decimal_string( + self.ctx.z3_ctx, + self.z3_ast, + precision as _, + )) + } + .to_str() + .unwrap(); s.strip_suffix("?").unwrap_or(s).to_owned() } pub fn approx_f64(&self) -> f64 { diff --git a/z3/tests/ops.rs b/z3/tests/ops.rs index 22e27ae4..f717eac4 100644 --- a/z3/tests/ops.rs +++ b/z3/tests/ops.rs @@ -1,7 +1,7 @@ use z3::{ ast, ast::{Array, Ast, AstKind, Bool, Dynamic, Float, Int, Real, BV}, - Config, Context, DeclKind, FuncDecl, Sort, Solver, SatResult + Config, Context, DeclKind, FuncDecl, SatResult, Solver, Sort, }; #[test]