aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-memquota/src/memory_cost.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* memquota: Extract HasMemoryCost and derive to new crate.Nick Mathewson2026-02-021-32/+2
| | | | This will help resolve some dependencies in our graph.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-memquota: miri: disable tests that use coarsetimeIan Jackson2024-10-081-1/+3
|
* tor-memquota: Provide TypedParticipation::try_claim_or_returnIan Jackson2024-10-011-1/+24
| | | | We're going to want this for try_send.
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-1/+1
| | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* tor-memquota: Use clippy::arithmetic_side_effects, against panicsIan Jackson2024-09-101-0/+1
| | | | | | This detect possibly-panicking operations. Empirically this lint seems rather better now.
* tor-memquota: Pass EnabledToken to HasMemoryCost methodIan Jackson2024-08-191-10/+20
|
* tor-memquota: Pass EnabledToken to IsParticipant methodsIan Jackson2024-08-191-2/+2
| | | | | | | This will hopefully allow much caller code to be compiled out. The users (IsParticipant impls) don't generally need to bother with it - they can just ignore it.
* tor-memquota: Allow memory tracking to be compiled outIan Jackson2024-08-191-1/+1
| | | | | | | Now if we run doctests without the feature enabled, we test that a no-op MemoryQuotaTracker works. Those tests aren't currently run in CI, but they will be after !2350.
* tor-memquota: Rename mby test helper fn to mbytesIan Jackson2024-08-151-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059520
* tor-memquota: memory_cost: Introduce try_claim (tests)Ian Jackson2024-07-241-0/+31
|
* tor-memquota: memory_cost: Introduce try_claimIan Jackson2024-07-241-0/+38
| | | | | Our stream wrapper is going to want this. It's fiddly enough that doing it as a standalone facility seems sensible.
* tor-memquota: memory_cost: New trait and typed wrappers (tests)Ian Jackson2024-07-241-0/+69
|
* tor-memquota: memory_cost: New trait and typed wrappersIan Jackson2024-07-241-0/+155