Commit Graph

37 Commits

Author SHA1 Message Date
Nick Mathewson 9abad8a2be linkspec: Define owned variants of ChanTarget and CircTarget. 2021-06-13 13:03:30 -04:00
Nick Mathewson 2102d2e2b5 Add noop_method_call warning.
This would have saved ahf and me a lot of confusion in debugging a
situation where we were cloning a reference of a type that didn't
implement Clone.
2021-05-27 14:32:29 -04:00
Nick Mathewson 745c90e92c Enable cargo_common_metadata warning. 2021-05-25 15:42:47 -04:00
Nick Mathewson cf59e9be77 Add automatically generated README.md files to each crate. 2021-05-25 15:41:23 -04:00
Nick Mathewson a7f7423c58 fix a doc link in tor-linkspec. 2021-05-24 14:35:08 -04:00
Nick Mathewson 46249e4d50 improve crate docs for tor-linkspec 2021-05-24 14:08:50 -04:00
Nick Mathewson ce6702a147 Give every Cargo.toml a repository field 2021-05-19 14:56:09 -04:00
Nick Mathewson 712e6ec23c Fill in "package.categories" on all Cargo.toml 2021-05-19 14:50:39 -04:00
Nick Mathewson 411e1b35e0 Add the "unreachable_pub" lint.
This is a somewhat obnoxious change in its scope and requirements,
but it makes it easier to understand what the real public and
private parts of our APIs are.
2021-05-18 13:45:39 -04:00
Nick Mathewson a5c0631728 Fix some warnings from nightly clippy 2021-05-07 16:32:41 -04:00
Nick Mathewson 8eb36cbfff Add trait_duplication_in_bounds warning. 2021-05-03 16:30:27 -04:00
Nick Mathewson d516298b47 Add unseparated_literal_suffix lint, and fix it. 2021-05-03 16:19:01 -04:00
Nick Mathewson 9737580402 Add a few more clippy warnings 2021-05-03 16:10:39 -04:00
Nick Mathewson 94c93c9121 Add some more clippy warnings to our list. 2021-04-27 14:51:04 -04:00
Nick Mathewson 2e3780affb Enforce (and obey) clippy lints about exhaustive enums, structs.
These lints force us to declare our exported enums and
exhaustive-looking structs as non-exhaustive (so that we can add to
them in the future without breaking our API) or to explicitly
disable the warning for a given enum/struct (to say that we _intend_
for additions to be a breaking change).
2021-04-27 14:17:49 -04:00
Nick Mathewson d52ff18b46 Fix a bunch more new clippy lints in Rust 1.51
The major types are:
  * You implemented Into when you should have implemented From.
  * You sliced a slice when you didn't have to.
  * You said Ok(x?) when you could have said x.
  * You said Vec::new(); push(); push(); when you could have said vec![].
2021-03-29 16:45:45 -04:00
Nick Mathewson 3ad503866d Fix Rust-1.51 clippy warnings about acronyms in camel case.
This is painful, but we shouldn't have to do it again.
2021-03-29 16:33:48 -04:00
Nick Mathewson 3800c459f6 Rename Rsa{Identity,Signature} to fix clippy warning. 2021-03-29 16:14:43 -04:00
Nick Mathewson 6daf57957d Add the tor project as an author. 2021-03-17 14:43:40 -04:00
Nick Mathewson ba14d43be4 Add keywords to each Cargo.toml 2021-03-17 14:41:02 -04:00
Nick Mathewson c8481a9354 Add a description field to all our Cargo.toml files 2021-03-17 14:31:59 -04:00
Nick Mathewson 58d8472ea0 Give it a homepage everyplace. 2021-03-17 14:13:26 -04:00
Nick Mathewson 564bf104d5 Change how we sort link specifiers in extend cells
Instead of implementing a dubious PartialOrd for link spec, add a
sorting function and call that explicitly.
2021-03-04 11:13:22 -05:00
Nick Mathewson 295a791a82 Improvements to Relay type in tor-netdir.
Now, a Relay is always valid.  This required some changes to the
API: all_relays() has to return a new UncheckedRelay type that might
or might not be valid, and the functions on Relay and ChanTarget
that return ed25519 identities need to return an Ed25519Identity,
not an ed25519::PublicKey.

This change required some new encoding/decoding/conversion functions
on Ed25519Identity.
2020-10-19 09:22:49 -04:00
Nick Mathewson 9d6d26d310 Explain problems with APIs in linkspec::traits. 2020-10-18 21:12:58 -04:00
Nick Mathewson 5523134607 Mark must-resolve XXXX issues with "XXXXM3".
"M3" is for "milestone 3" -- my target to fix the technical debt
that I think will be bad if we ship even a pre-alpha with it.

These aren't necessarily _all_ must-resolve, but they're all
must-look-at.

Closes #15
2020-10-18 17:38:59 -04:00
Nick Mathewson 0bd6d62951 tor-linkspec: remove a completed TODO 2020-10-18 17:03:11 -04:00
Nick Mathewson 22c84aeaf6 Tests for CircTarget::linkspecs() 2020-09-28 15:53:23 -04:00
Nick Mathewson 05da5a7f73 Rename some identifiers in tor-linkspec.
By convention, rust accessor functions don't start with 'get'.
2020-09-28 15:29:39 -04:00
Nick Mathewson 3b3a6736f6 Rename ExtendTarget to CircTarget. 2020-09-28 15:22:24 -04:00
Nick Mathewson 3d5cd55669 Add test vectors for a few relay message types.
I generated these by running an instrumented version of Tor through
chutney.
2020-09-26 17:32:15 -04:00
Nick Mathewson a3143ab960 Run cargo upgrade. 2020-09-26 14:20:28 -04:00
Nick Mathewson f945af0c41 Document private members in most crates 2020-09-24 19:25:37 -04:00
Nick Mathewson bf7672cb77 A few tests for tor-linkspec 2020-09-23 16:47:37 -04:00
Nick Mathewson f256847f82 Sort linkspecs in the same order as tor does 2020-09-17 15:33:18 -04:00
Nick Mathewson df0ebf857f Make more types implement Debug. 2020-09-12 20:45:59 -04:00
Nick Mathewson 875e932898 New "linkspec" module to encapsulate info needed to connect/extend. 2020-09-08 20:43:15 -04:00