From 69612fa507af26a6e1f3f1ef73d392b3f34794ea Mon Sep 17 00:00:00 2001 From: e-rhodes <33500135+e-rhodes@users.noreply.github.com> Date: Sun, 6 Nov 2022 00:18:07 -0600 Subject: [PATCH] Fix typo in error name (#1180) * fix typo in error name * fixed typo in docs Co-authored-by: erhodes --- src/error.rs | 4 ++-- src/executor/update.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/error.rs b/src/error.rs index 58e6a1a7..099c62f4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -33,10 +33,10 @@ pub enum DbErr { /// After an insert statement it was impossible to retrieve the last_insert_id #[error("Failed to unpack last_insert_id")] UnpackInsertId, - /// When updating, a model should know it's primary key to check + /// When updating, a model should know its primary key to check /// if the record has been correctly updated, otherwise this error will occur #[error("Failed to get primary key from model")] - UpdateGetPrimeryKey, + UpdateGetPrimaryKey, /// The record was not found in the database #[error("RecordNotFound Error: {0}")] RecordNotFound(String), diff --git a/src/executor/update.rs b/src/executor/update.rs index c06606dc..190347e0 100644 --- a/src/executor/update.rs +++ b/src/executor/update.rs @@ -116,7 +116,7 @@ where Updater::new(query).check_record_exists().exec(db).await?; let primary_key_value = match model.get_primary_key_value() { Some(val) => FromValueTuple::from_value_tuple(val), - None => return Err(DbErr::UpdateGetPrimeryKey), + None => return Err(DbErr::UpdateGetPrimaryKey), }; let found = ::find_by_id(primary_key_value) .one(db)