From f509b8810988285a203f9f07c0f0aa5b7c5fecf2 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 17 Mar 2022 22:26:34 +0000 Subject: [PATCH] Ensure upper range is included in a |test:1..10| model --- lib/src/dbs/channel.rs | 2 +- lib/src/dbs/iterate.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/dbs/channel.rs b/lib/src/dbs/channel.rs index 1fffff2f..b3e505ac 100644 --- a/lib/src/dbs/channel.rs +++ b/lib/src/dbs/channel.rs @@ -79,7 +79,7 @@ impl Model { } } if let Some(r) = self.range { - for x in r.0..r.1 { + for x in r.0..=r.1 { Thing { tb: self.table.to_string(), id: x.to_string(), diff --git a/lib/src/dbs/iterate.rs b/lib/src/dbs/iterate.rs index 86f23b43..7bac0e92 100644 --- a/lib/src/dbs/iterate.rs +++ b/lib/src/dbs/iterate.rs @@ -82,7 +82,7 @@ impl Model { } } if let Some(r) = self.range { - for x in r.0..r.1 { + for x in r.0..=r.1 { Thing { tb: self.table.to_string(), id: x.to_string(),