summaryrefslogtreecommitdiff
path: root/crates/tor-bytes
Commit message (Collapse)AuthorAgeFilesLines
* Bump the patch version of every crate that had API additionsNick Mathewson2023-02-011-3/+3
| | | | | | These crates had API or behavior changes that may affect downstream crates. Fortunately, they're all version 0.x, and don't need minor bumps for this.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-272-0/+2
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* tor-bytes: impl Writeable for &impl WriteableIan Jackson2023-01-242-0/+7
|
* tor-bytes: Implement conversion from EncodeError to BugIan Jackson2023-01-242-1/+17
|
* Do not .gitignore crates/*/fuzz/corpusIan Jackson2023-01-201-1/+0
| | | | | These are symlinks which are actually checked in. They should not be ignored. (This caused trouble for some of my privsep tooling...)
* Merge branch 'test-lints' into 'main'eta2023-01-062-0/+18
|\ | | | | | | | | Add test lint blocks to all "mod test" See merge request tpo/core/arti!937
| * test lint blocks: Add many many automaticallyIan Jackson2022-12-122-0/+18
| | | | | | | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* | doc: consistent summary line for the READMEsEmil Engler2022-12-201-1/+1
|/ | | | | This commit introduces a consistency to the summary line of all README.md files in each and every crate.
* Bump the minor version of every crate.Nick Mathewson2022-11-301-3/+3
| | | | | We made this job easy this time around: by incrementing our MSRV, we have forced ourselves to do at least a minor bump everywhere.
* bump rust-version to 1.60 in every crate.Nick Mathewson2022-11-101-1/+1
|
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* set all crate edition to 2021trinity-1686a2022-11-011-1/+1
|
* tor-bytes: Avoid redundant allocationEmil Engler2022-10-251-1/+1
| | | | See c489e1d9118edd842f80b76a636037524a45ee45
* Fix some rustdoc errors.Nick Mathewson2022-10-134-10/+7
| | | | | | In addition to the usual "You named that method wrong!" errors, we have a new rustdoc error that complains about bogus "HTML tags" that are actually unquoted usage of types like `Result<Foo>`.
* cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
* Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-48/+1
| | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
* Upgrade all fuzzers to newer libfuzzer-sys version.Nick Mathewson2022-10-031-1/+1
|
* Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-1/+1
|
* Remove semver.md from arti-1.0.0Nick Mathewson2022-09-071-2/+0
|
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|
* New SecretBuf type in tor-bytesNick Mathewson2022-08-014-0/+128
| | | | | | | | | This Writer is a simple wrapper around `Vec<u8>` that makes sure that its contents are cleared whenever they are dropped _or reallocated_. The reallocation is the important part here: without that, we risk not zeroizing the first allocation of the buffer.
* Now that versions have bumped, remove semver.md files.Nick Mathewson2022-08-011-1/+0
|
* Bump patch versions on crates that have new APIs.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | | | | | Do _not_ bump the dependency versions on crates that have had no changes since arti 0.0.5, since those crates do not depend on the new APIs. ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p tor-llcrypto --bump patch git restore crates/tor-checkable git restore crates/tor-consdiff git restore crates/tor-rtmock ```
* Bump minor versions on all crates that have had breaking changes.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Done with these commands: ``` cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti --bump minor ```
* Apply 1 suggestion(s) to 1 file(s)eta2022-07-191-1/+1
|
* Remove the last vestiges of write_infallible.Nick Mathewson2022-07-113-41/+7
| | | | | Now that everything has been converted to fallible writers, we get to finally remove write_infallible() from tor_bytes.
* tor-bytes::impls: Remove usage of infallible writers.Nick Mathewson2022-07-111-2/+2
|
* Remove "write_and_consume_infallible".Nick Mathewson2022-07-111-9/+3
| | | | | | There were only a few of these. Removing it required porting everything to use `write_and_consume` instead, and handling its (potential) errors.
* Convert each write_onto_infallible implementation into write_onto.Nick Mathewson2022-07-112-15/+29
|
* Convert each write_into_infallible implementation into write_into.Nick Mathewson2022-07-111-1/+2
| | | | (There was only one.)
* Define new write_into and write_onto methods with correct APIs.Nick Mathewson2022-07-112-6/+56
|
* Rename "write" methods on tor-bytes to "write_infallible".Nick Mathewson2022-07-113-31/+31
| | | | | | | | | | | | | | | This comprises four renames: ``` write_onto -> write_onto_infallible write_into -> write_into_infallible write -> write_infallible writer_and_consume -> write_and_consume_infallible. ``` The rest of this branch will be concerned with replacing these `_infallible` methods with ones that return a `Result`. This is part of #513.
* Add a Bug variant to tor-bytes::EncodeError.Nick Mathewson2022-07-112-2/+11
| | | | This will help down the line as we make more writers fallible.
* Remove semver.md files now that 0.5.0 is outNick Mathewson2022-06-241-1/+0
|
* Bump crate and dependency versions.Nick Mathewson2022-06-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were done with the following commands: ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-error --bump patch cargo set-version -p tor-config --bump patch cargo set-version -p tor-units --bump patch cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-llcrypto --bump patch cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump patch cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump patch cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump patch cargo set-version -p tor-dirclient --bump patch cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump patch cargo set-version -p arti --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor ```
* Merge branch 'clippy' into 'main'Ian Jackson2022-06-241-0/+3
|\ | | | | | | | | Fix clippy nightly again See merge request tpo/core/arti!603
| * Run maint/add_warning crates/*/src/{lib,main}.rsIan Jackson2022-06-231-0/+3
| | | | | | | | Update all lint blocks
* | tor-bytes: Split EncodeError from ErrorNick Mathewson2022-06-233-8/+18
|/ | | | | | | | | | | Since there is currently only one error type that can occur when encoding, it doesn't make sense to use the full Error type here. This split will help us downstream, as we no longer need to categorize tor_bytes::Error as "an error in encoding or decoding". I considered renaming Error to DecodeError, but that had pretty huge downstream effects, and didn't seem to be worth it.
* tor-cell: error usefulness and style fixesNick Mathewson2022-06-221-0/+1
|
* Style fixes to tor-bytes errors.Nick Mathewson2022-06-221-5/+9
| | | | | Also note an issue with the design of tor-bytes::Error that should probably go in a separate MR.
* tor-bytes: read_nested_*: rustfmtIan Jackson2022-06-101-13/+23
| | | | I disagree with almost all of these layout decisions...
* tor-bytes: read_nested_*: Take a closureIan Jackson2022-06-101-25/+40
| | | | | | | | | | This eliminates the possibility of writing the bug of failing to call `should_be_exhausted`. As per this discussion https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/572#note_2811464 Fixes #498
* Fix typos in docs and commentsNick Mathewson2022-06-091-2/+2
|
* tor-bytes: Provide nested writersIan Jackson2022-06-092-1/+117
|
* tor-bytes: Provide nested readersIan Jackson2022-06-092-0/+70
|
* tor-bytes: Reader: Provide take_restIan Jackson2022-06-092-0/+20
| | | | We'll want this in a moment.
* tor-bytes: Prepare errors for nested reader/writerIan Jackson2022-06-091-1/+5
| | | | Writing is going to be able to give errors too.
* lints: Add let_unit_value allow to all cratesIan Jackson2022-05-311-0/+1
| | | | | From running add_warning, with manual picking of the right hunks/lines.