From 609149dc12f2a3a0128f25f082e8d7a6599174bd Mon Sep 17 00:00:00 2001 From: Guillaume Pinot Date: Wed, 15 Sep 2021 18:20:34 +0200 Subject: [PATCH] track_caller on solution_value --- src/builder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/builder.rs b/src/builder.rs index 5cc2c1e..b314e35 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -771,6 +771,7 @@ impl BoolVar { /// assert_eq!(response.status(), CpSolverStatus::Optimal); /// assert!(x.solution_value(&response)); /// ``` + #[track_caller] pub fn solution_value(self, response: &proto::CpSolverResponse) -> bool { if self.0 < 0 { use std::ops::Not; @@ -822,6 +823,7 @@ impl IntVar { /// assert_eq!(response.status(), CpSolverStatus::Optimal); /// assert_eq!(42, x.solution_value(&response)); /// ``` + #[track_caller] pub fn solution_value(self, response: &proto::CpSolverResponse) -> i64 { if self.0 < 0 { 1 - self.not().solution_value(response)