From 2ce624add35a542eede4639cc45e7af7a4ceb5c9 Mon Sep 17 00:00:00 2001 From: kaichaosun Date: Tue, 5 Aug 2025 15:45:32 +0800 Subject: [PATCH] chore: clear unused code --- chat_sdk/segmentation.nim | 21 --------------------- tests/test_segmentation.nim | 3 --- 2 files changed, 24 deletions(-) diff --git a/chat_sdk/segmentation.nim b/chat_sdk/segmentation.nim index 994a095..85d20ed 100644 --- a/chat_sdk/segmentation.nim +++ b/chat_sdk/segmentation.nim @@ -254,24 +254,3 @@ proc handleSegmentationLayer*(handler: SegmentationHander, message: var Message) proc cleanupSegments*(s: SegmentationHander): Result[void, string] = discard - -proc demo() = - let - bufSize = 64 # byte count per buffer, must be a multiple of 64 - buffers = 239 # number of data symbols - parity = 17 # number of parity symbols - - var - encoderRes = LeoEncoder.init(bufSize, buffers, parity) - decoderRes = LeoDecoder.init(bufSize, buffers, parity) - - assert encoderRes.isOk - assert decoderRes.isOk - - -when isMainModule: - demo() - -proc add2*(x, y: int): int = - ## Adds two numbers together. - return x + y diff --git a/tests/test_segmentation.nim b/tests/test_segmentation.nim index 8112c06..c1064b5 100644 --- a/tests/test_segmentation.nim +++ b/tests/test_segmentation.nim @@ -13,9 +13,6 @@ import chat_sdk/segmentation import chat_sdk/migration import chat_sdk/db -test "can add": - check add2(5, 5) == 10 - proc newInMemoryPersistence(): SegmentationPersistence = let conn = open(":memory:", "", "", "") # Define the tables (same schema as expected in your app)