summaryrefslogtreecommitdiff
path: root/crates/tor-async-utils/src
Commit message (Collapse)AuthorAgeFilesLines
* tor-async-utils: Fix type inference in test.Gabriela Moldovan2025-01-151-1/+2
|
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* Remove an obsolete TODOIan Jackson2024-10-211-4/+0
| | | | This *is* in tor-async-utils :-).
* Introduce mpsc_channel_no_memquota and use it in the places it's wantedIan Jackson2024-10-151-0/+17
| | | | | These are the call sites where using this fucntion is correct. (Outside tor-rtmock, which we'll do separately.)
* Merge branch 'close-channel-2' into 'main'Nick Mathewson2024-10-022-0/+72
|\ | | | | | | | | Provide and implement SinkCloseChannel See merge request tpo/core/arti!2485
| * tor-async-utils: Fix typo.Ian Jackson2024-10-021-1/+1
| |
| * tor-async-utils: SinkCloseChannel: Tidy up doc commentIan Jackson2024-10-021-4/+5
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2485#note_3086969
| * Provide SinkCloseChannelIan Jackson2024-10-012-0/+71
| | | | | | | | | | The circuit reactor calls mpsc::Channel::close_channel, but we want to wrap up the mpsc, so we need to make this a trait method.
* | tor-async-utils: SinkTrySend: Fix a doc commentIan Jackson2024-10-021-1/+1
|/ | | | | | | | This was a copypaste error, resulting in a statement with the wrong sense. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2468#note_3086961
* tor-async-utils: Avoid needless nesting of ErasedSinkTrySendErrorIan Jackson2024-10-011-1/+22
|
* tor-async-utils: Provide tests for ErasedSinkTrySendErrorIan Jackson2024-10-011-0/+67
|
* tor-async-utils: Implement SinkTrySend for mpsc::SenderIan Jackson2024-10-012-0/+138
|
* tor-async-utils: Provide new SinkTrySend traitIan Jackson2024-10-012-0/+57
| | | | | | | | | This is the method try_send from mpsc::channel::Sender. We want to be able to replace that type in tor-circmgr with a memquota wrapper, so the call needs to be a trait method. This API is deceptively simple. Implementing it will involve more support machinery for error handling.
* tor-async-utils: Re-export oneshot-fused-workaround as oneshot.Gabriela Moldovan2024-09-031-0/+2
|
* Move stream_peek into tor-async-utilsJim Newsome2024-08-292-0/+522
|
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-282-43/+0
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* tor-async-utils: add traits PeekableStream and UnobtrusivePeekableStreamJim Newsome2024-08-212-0/+129
|
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Remove two unused cases of "TestError"Nick Mathewson2024-05-052-6/+0
|
* Resolve some clippy warnings about empty rustdoc.Nick Mathewson2024-05-051-4/+4
| | | | | (In most cases, by writing the documentation; in tests, by permitting the documentation to be missing.)
* Run maint/add_warning.Nick Mathewson2024-03-132-0/+2
|
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-111-1/+1
| | | | cargo fmt, precisely.
* oneshot: Introduce veneer in tor_rtcompatIan Jackson2023-10-112-0/+44
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-232-0/+2
|
* tor-async-utils: Deprecate DropNotifyEofSignallable::is_eofIan Jackson2023-08-171-2/+12
| | | | | | | This was introduced in c82cda85d69d tor-basic-utils: DropNotifyWatchSender: use DropNotifyEofSignallable and already, then, the is_eof() method is redundant.
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-103-0/+3
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* async-utils: Add a SinkExt with a with_fnNick Mathewson2023-04-192-0/+85
| | | | | (This function behaves as `futures::sink::SinkExt::with`, except that the function that it takes does not return a future.)
* async-utils: rename sinkext to prepare_sendNick Mathewson2023-04-192-2/+2
|
* async-utils: rename SinkExt to SinkPrepareExtNick Mathewson2023-04-192-12/+12
|
* JoinReadWrite: Minor docs improvements.Ian Jackson2023-04-061-3/+2
|
* JoinReadWrite: Move the example to the structIan Jackson2023-04-061-23/+25
| | | | This makes it more prominent on the rustdoc page.
* JoinReadWrite: Discuss using .reunite() or .unsplit()Ian Jackson2023-04-061-3/+5
| | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1115#note_2894238 And move the "This is the converse" comment to somewhere it actually appears in public docs. The module-level docs only appear with --document-private-items because the modules themselves are private.
* tor-async-utils: Introduce JoinReadWriteIan Jackson2023-04-052-0/+95
| | | | | I wanted one of these for a test stream. Unaccountably neither the futures crate, nor tokio, seem to have one!
* Move functionality from tor_basic_utils to tor_async_utilsNick Mathewson2023-03-293-0/+759
| | | | | This commit is mostly code movement; I'd recommend reviewing it with git's `--color-moved` option.
* Make a new empty tor-async-utils crate.Nick Mathewson2023-03-291-0/+39