Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit 5d94d7c

Browse files
committed
slice -> iterate
1 parent 6a798b1 commit 5d94d7c

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

archaeologist/src/background/suggestAssociations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function suggestAssociations(
77
limit?: number
88
): Promise<TNode[]> {
99
const beagle = Beagle.fromString(phrase)
10-
const iter = storage.node.slice()
10+
const iter = storage.node.iterate()
1111
const suggested: TNode[] = []
1212
limit = limit ?? 8
1313
// FIXME(akindyakov): This is a dirty hack to limit time of search by limiting

archaeologist/src/omnibox/omnibox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const lookUpAndSuggestFor = lodash.debounce(
5252
suggest: (suggestResults: browser.Omnibox.SuggestResult[]) => void
5353
): Promise<void> => {
5454
const beagle = Beagle.fromString(text)
55-
const iter = storage.node.slice()
55+
const iter = storage.node.iterate()
5656
const suggestions: browser.Omnibox.SuggestResult[] = []
5757
for (
5858
let node = await iter.next();

elementary/src/grid/SearchGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const SearchGrid = ({
7676
} | null>(null)
7777
useEffect(() => {
7878
setUpSearch({
79-
iter: storage.node.slice(),
79+
iter: storage.node.iterate(),
8080
beagle: Beagle.fromString(q || undefined),
8181
})
8282
}, [q])

smuggler-api/src/api_datacenter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ export function makeDatacenterStorageApi(): StorageApi {
807807
getByOrigin: getNodesByOrigin,
808808
update: updateNode,
809809
create: createNode,
810-
slice: () => _getNodesSliceIter({}),
810+
iterate: () => _getNodesSliceIter({}),
811811
delete: deleteNode,
812812
bulkDelete: bulkDeleteNodes,
813813
batch: {

smuggler-api/src/storage_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export type StorageApi = {
8181
args: CreateNodeArgs,
8282
signal?: AbortSignal
8383
) => Promise<NewNodeResponse>
84-
slice: () => INodeIterator
84+
iterate: () => INodeIterator
8585
delete: ({
8686
nid,
8787
signal,

smuggler-api/src/storage_api_throwing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function makeAlwaysThrowingStorageApi(): StorageApi {
1717
getByOrigin: throwError,
1818
update: throwError,
1919
create: throwError,
20-
slice: throwError,
20+
iterate: throwError,
2121
delete: throwError,
2222
bulkDelete: throwError,
2323
batch: {

0 commit comments

Comments
 (0)