Skip to content

Commit bdd43a5

Browse files
authored
Merge pull request #3 from telatin/master
shadow() deprecation
2 parents 6629ba7 + 5985f57 commit bdd43a5

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
nim-version: ['1.6.20', '2.0.4', 'stable']
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Nim
20+
uses: jiro4989/setup-nim-action@v2
21+
with:
22+
nim-version: ${{ matrix.nim-version }}
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Run example
26+
run: nim c -r example.nim

lapper.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "0.1.7"
3+
version = "0.1.8"
44
author = "Brent Pedersen"
55
description = "fast, simple interval overlaps with binary search"
66
license = "MIT"

src/lapper.nim

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ proc empty*[T:Interval](L:Lapper[T]): bool {.inline.} =
129129
iterator find*[T:Interval](L:var Lapper[T], start:int, stop:int): T =
130130
## fill ivs with all intervals in L that overlap start .. stop.
131131
#if ivs.len != 0: ivs.set_len(0)
132-
shallow(L.intervals)
133132
let off = lowerBound(L.intervals, start - L.max_len)
134133
for i in off..L.intervals.high:
135134
let x = L.intervals[i]
@@ -140,7 +139,6 @@ iterator find*[T:Interval](L:var Lapper[T], start:int, stop:int): T =
140139
proc find*[T:Interval](L:var Lapper[T], start:int, stop:int, ivs:var seq[T]): bool =
141140
## fill ivs with all intervals in L that overlap start .. stop.
142141
#if ivs.len != 0: ivs.set_len(0)
143-
shallow(L.intervals)
144142
let off = lowerBound(L.intervals, start - L.max_len)
145143
var n = 0
146144
for i in off..L.intervals.high:
@@ -158,7 +156,6 @@ proc find*[T:Interval](L:var Lapper[T], start:int, stop:int, ivs:var seq[T]): bo
158156

159157
proc count*[T:Interval](L:var Lapper[T], start:int, stop:int): int =
160158
## fill ivs with all intervals in L that overlap start .. stop.
161-
shallow(L.intervals)
162159
let off = lowerBound(L.intervals, start - L.max_len)
163160
for i in off..L.intervals.high:
164161
let x = L.intervals[i]

0 commit comments

Comments
 (0)