From 6ecc3138c307072b896f65e5ab28129a444bc325 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Tue, 12 Oct 2021 21:14:40 +0800 Subject: [PATCH] Use new `ActiveValue::into_value()` --- src/entity/active_model.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/entity/active_model.rs b/src/entity/active_model.rs index e0173a6d..4692bce6 100644 --- a/src/entity/active_model.rs +++ b/src/entity/active_model.rs @@ -10,8 +10,7 @@ pub struct ActiveValue where V: Into, { - // Don't want to call ActiveValue::unwrap() and cause panic - pub(self) value: Option, + value: Option, state: ActiveValueState, } @@ -74,7 +73,7 @@ pub trait ActiveModelTrait: Clone + Debug { macro_rules! next { () => { if let Some(col) = cols.next() { - if let Some(val) = self.get(col.into_column()).value { + if let Some(val) = self.get(col.into_column()).into_value() { val } else { return None;