From 0d55475c29f232b849c9d9456bcb21287b046cda Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Mon, 13 Nov 2023 10:56:19 +0100 Subject: [PATCH] `stew/results` -> `results` (#468) --- chronos.nimble | 1 + chronos/apps/http/httpclient.nim | 4 ++-- chronos/apps/http/httpcommon.nim | 2 +- chronos/apps/http/httpdebug.nim | 2 +- chronos/apps/http/httpserver.nim | 4 ++-- chronos/apps/http/multipart.nim | 4 ++-- chronos/asyncproc.nim | 2 +- chronos/handles.nim | 2 +- chronos/internal/asyncengine.nim | 2 +- chronos/osutils.nim | 4 ++-- chronos/selectors2.nim | 4 ++-- chronos/streams/boundstream.nim | 2 +- chronos/streams/chunkstream.nim | 2 +- chronos/threadsync.nim | 2 +- 14 files changed, 19 insertions(+), 18 deletions(-) diff --git a/chronos.nimble b/chronos.nimble index 667d1da..b2fdb3a 100644 --- a/chronos.nimble +++ b/chronos.nimble @@ -8,6 +8,7 @@ license = "MIT or Apache License 2.0" skipDirs = @["tests"] requires "nim >= 1.6.0", + "results", "stew", "bearssl", "httputils", diff --git a/chronos/apps/http/httpclient.nim b/chronos/apps/http/httpclient.nim index 34089c7..83d1ddf 100644 --- a/chronos/apps/http/httpclient.nim +++ b/chronos/apps/http/httpclient.nim @@ -7,13 +7,13 @@ # Apache License, version 2.0, (LICENSE-APACHEv2) # MIT license (LICENSE-MIT) import std/[uri, tables, sequtils] -import stew/[results, base10, base64, byteutils], httputils +import stew/[base10, base64, byteutils], httputils, results import ../../asyncloop, ../../asyncsync import ../../streams/[asyncstream, tlsstream, chunkstream, boundstream] import httptable, httpcommon, httpagent, httpbodyrw, multipart export results, asyncloop, asyncsync, asyncstream, tlsstream, chunkstream, boundstream, httptable, httpcommon, httpagent, httpbodyrw, multipart, - httputils, uri + httputils, uri, results export SocketFlags const diff --git a/chronos/apps/http/httpcommon.nim b/chronos/apps/http/httpcommon.nim index c01c1c3..da5e03f 100644 --- a/chronos/apps/http/httpcommon.nim +++ b/chronos/apps/http/httpcommon.nim @@ -7,7 +7,7 @@ # Apache License, version 2.0, (LICENSE-APACHEv2) # MIT license (LICENSE-MIT) import std/[strutils, uri] -import stew/results, httputils +import results, httputils import ../../asyncloop, ../../asyncsync import ../../streams/[asyncstream, boundstream] export asyncloop, asyncsync, results, httputils, strutils diff --git a/chronos/apps/http/httpdebug.nim b/chronos/apps/http/httpdebug.nim index a1dc022..d343265 100644 --- a/chronos/apps/http/httpdebug.nim +++ b/chronos/apps/http/httpdebug.nim @@ -7,7 +7,7 @@ # Apache License, version 2.0, (LICENSE-APACHEv2) # MIT license (LICENSE-MIT) import std/tables -import stew/results +import results import ../../timer import httpserver, shttpserver from httpclient import HttpClientScheme diff --git a/chronos/apps/http/httpserver.nim b/chronos/apps/http/httpserver.nim index 2ab5317..1e307a0 100644 --- a/chronos/apps/http/httpserver.nim +++ b/chronos/apps/http/httpserver.nim @@ -7,10 +7,10 @@ # Apache License, version 2.0, (LICENSE-APACHEv2) # MIT license (LICENSE-MIT) import std/[tables, uri, strutils] -import stew/[results, base10], httputils +import stew/[base10], httputils, results import ../../asyncloop, ../../asyncsync import ../../streams/[asyncstream, boundstream, chunkstream] -import httptable, httpcommon, multipart +import "."/[httptable, httpcommon, multipart] export asyncloop, asyncsync, httptable, httpcommon, httputils, multipart, asyncstream, boundstream, chunkstream, uri, tables, results diff --git a/chronos/apps/http/multipart.nim b/chronos/apps/http/multipart.nim index 45506a2..b936996 100644 --- a/chronos/apps/http/multipart.nim +++ b/chronos/apps/http/multipart.nim @@ -8,10 +8,10 @@ # Apache License, version 2.0, (LICENSE-APACHEv2) # MIT license (LICENSE-MIT) import std/[monotimes, strutils] -import stew/results, httputils +import results, httputils import ../../asyncloop import ../../streams/[asyncstream, boundstream, chunkstream] -import httptable, httpcommon, httpbodyrw +import "."/[httptable, httpcommon, httpbodyrw] export asyncloop, httptable, httpcommon, httpbodyrw, asyncstream, httputils const diff --git a/chronos/asyncproc.nim b/chronos/asyncproc.nim index 3e2df88..8615c57 100644 --- a/chronos/asyncproc.nim +++ b/chronos/asyncproc.nim @@ -13,7 +13,7 @@ import std/strtabs import "."/[config, asyncloop, handles, osdefs, osutils, oserrno], streams/asyncstream -import stew/[results, byteutils] +import stew/[byteutils], results from std/os import quoteShell, quoteShellWindows, quoteShellPosix, envPairs export strtabs, results diff --git a/chronos/handles.nim b/chronos/handles.nim index afa57fb..72b0751 100644 --- a/chronos/handles.nim +++ b/chronos/handles.nim @@ -10,7 +10,7 @@ {.push raises: [].} import "."/[asyncloop, osdefs, osutils] -import stew/results +import results from nativesockets import Domain, Protocol, SockType, toInt export Domain, Protocol, SockType, results diff --git a/chronos/internal/asyncengine.nim b/chronos/internal/asyncengine.nim index 0a15799..d4e803c 100644 --- a/chronos/internal/asyncengine.nim +++ b/chronos/internal/asyncengine.nim @@ -12,7 +12,7 @@ from nativesockets import Port import std/[tables, heapqueue, deques] -import stew/results +import results import ".."/[config, futures, osdefs, oserrno, osutils, timer] import ./[asyncmacro, errors] diff --git a/chronos/osutils.nim b/chronos/osutils.nim index f9c09f2..d93c261 100644 --- a/chronos/osutils.nim +++ b/chronos/osutils.nim @@ -6,8 +6,8 @@ # Licensed under either of # Apache License, version 2.0, (LICENSE-APACHEv2) # MIT license (LICENSE-MIT) -import stew/results -import osdefs, oserrno +import results +import "."/[osdefs, oserrno] export results diff --git a/chronos/selectors2.nim b/chronos/selectors2.nim index 5cb8a57..db8791a 100644 --- a/chronos/selectors2.nim +++ b/chronos/selectors2.nim @@ -31,8 +31,8 @@ # support - changes could potentially be backported to nim but are not # backwards-compatible. -import stew/results -import config, osdefs, osutils, oserrno +import results +import "."/[config, osdefs, osutils, oserrno] export results, oserrno when defined(nimdoc): diff --git a/chronos/streams/boundstream.nim b/chronos/streams/boundstream.nim index 73321eb..dbb36ef 100644 --- a/chronos/streams/boundstream.nim +++ b/chronos/streams/boundstream.nim @@ -14,7 +14,7 @@ ## ## For stream writing it means that you should write exactly bounded size ## of bytes. -import stew/results +import results import ../asyncloop, ../timer import asyncstream, ../transports/stream, ../transports/common export asyncloop, asyncstream, stream, timer, common diff --git a/chronos/streams/chunkstream.nim b/chronos/streams/chunkstream.nim index 729d8de..c0269a2 100644 --- a/chronos/streams/chunkstream.nim +++ b/chronos/streams/chunkstream.nim @@ -10,7 +10,7 @@ ## This module implements HTTP/1.1 chunked-encoded stream reading and writing. import ../asyncloop, ../timer import asyncstream, ../transports/stream, ../transports/common -import stew/results +import results export asyncloop, asyncstream, stream, timer, common, results const diff --git a/chronos/threadsync.nim b/chronos/threadsync.nim index d414181..bbff18b 100644 --- a/chronos/threadsync.nim +++ b/chronos/threadsync.nim @@ -8,7 +8,7 @@ # MIT license (LICENSE-MIT) ## This module implements some core async thread synchronization primitives. -import stew/results +import results import "."/[timer, asyncloop] export results