Nick Mathewson
9310273448
Remove some (but not all) needless dependencies.
2021-06-17 09:09:43 -04:00
Nick Mathewson
8e2246b009
Make a few error types implement Clone
...
To make this work we have to wrap std::io::Error in an Arc. The
benefit of having these errors implement Clone is that we can
provide the same Error in response to multiple requests when they
are all waiting on the same operation.
2021-06-14 09:24:08 -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
7f681ac824
Use the "typos" tool to fix some spelling
2021-05-26 19:18:35 -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
80108110e2
Light tweaks to tor-cell doc
2021-05-24 14:13:25 -04:00
Nick Mathewson
ce6702a147
Give every Cargo.toml a repository field
2021-05-19 14:56:09 -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
80535dda01
Check "connection" usage for when stream or channel would be better.
2021-05-18 11:17:28 -04:00
Nick Mathewson
9e7de1a692
Prefer "relay" over "node" in most circumstances.
2021-05-18 11:04:44 -04:00
Nick Mathewson
a5c0631728
Fix some warnings from nightly clippy
2021-05-07 16:32:41 -04:00
Nick Mathewson
e01f227191
Resolve clippy warnings from Rust 1.52.
...
Rust 1.52 just came out, and there are new clippy lints to deal
with:
* It spots more cases when we could use Option::map
* It spots more cases when we could use Iterator::flatten
* When we build a struct instance, it wants us to list the fields
in the same order that the struct declares them.
2021-05-07 15:53:17 -04:00
Nick Mathewson
d223c232d0
Use s.parse(), not u16::from_str_radix(s,10)
...
Clippy started warning on this with Rust 1.52. I'm fairly sure that
when I wrote this code I was worried that <u16 as FromStr>::parse()
might allow hex or something. But fortunately, it doesn't work that
way, so I don't need to be paranoid here.
2021-05-07 15:51:13 -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
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
603b0436e0
Add a compatibility layer so we can upgrade rand_core.
...
dalek-crypto is stuck on rand_core 0.5.1, so we've been stuck too.
This commit introduces a compatibility module so that we can wrap
new rand_core instances to make them backward compatible.
2021-03-18 13:16:32 -04:00
Nick Mathewson
a4e0dde4da
Add appropriate categories to some Cargo.toml files.
2021-03-17 14:51:18 -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
7b4ca6d954
Better management for END cells in streams.
2021-03-10 15:02:34 -05:00
Nick Mathewson
302653977d
Bump dependencies with "cargo upgrade"
2021-03-06 08:55:13 -05:00
Nick Mathewson
95c71aff91
clippy warning on msg.rs
2021-03-04 11:54:14 -05: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
2c8a6de8ac
Avoid an is_some()/unwrap() pair in End cell parsing
2021-03-04 11:12:35 -05:00
Nick Mathewson
ab9d4a2229
Update some dependencies.
2021-02-19 09:39:23 -05:00
Nick Mathewson
a27eeb1e61
Migrate from futures_codec to asynchronous_codec.
...
asynchronous_codec is a fork of futures_codec that is up-to-date on
its dependencies.
This migration allows us to upgrade to the current version of the
bytes crate.
2021-01-15 17:01:07 -05:00
Nick Mathewson
e2997477a8
Remove unused futures_codec in tor-cell/fuzz
2021-01-15 16:11:34 -05:00
Nick Mathewson
f01d641ec8
cargo upgrade.
2020-12-30 15:59:33 -05:00
Nick Mathewson
cae16665cb
Basic support for IPv6 and begin flags.
...
We now have a way to tell a circuitmgr whether we require ipv4/ipv6
support for a target address in an exit policy, and we use similar
logic to set begin flags.
2020-12-15 14:41:03 -05:00
Nick Mathewson
affe5c5c53
Use a set of named flags for BeginFlags in tor-cell.
2020-12-15 14:08:36 -05:00
Nick Mathewson
7ecfa4c863
Remove a couple of stray dbg!() calls.
2020-11-19 19:23:34 -05:00
Nick Mathewson
4d24fff9c0
Upgrade dependencies
2020-11-10 12:27:10 -05:00
Nick Mathewson
0db18afa39
tor-cell: In netinfo, unspecified addresses are None.
2020-10-29 17:03:12 -04:00
Nick Mathewson
705d9c061f
Add a test for extending a circuit with ntor.
2020-10-27 14:26:22 -04:00
Nick Mathewson
8f5d239c21
Expand test to handle building circuit with ntor.
2020-10-27 12:23:18 -04:00
Nick Mathewson
ee9ad7f59d
Run "cargo upgrade".
2020-10-26 14:56:06 -04:00
Nick Mathewson
b93e4b76c8
Remove a bunch of dbg! calls.
2020-10-26 14:33:14 -04:00
Nick Mathewson
94231230b0
Improve documentation in tor-cell
2020-10-26 11:51:11 -04:00
Nick Mathewson
fa01a50f32
Rename CircID and StreamID to end with Id instead, for consistency
2020-10-25 20:29:01 -04:00
Nick Mathewson
4bddde1b83
A few coverage-driven tests in tor-cell.
2020-10-21 10:49:04 -04:00
Nick Mathewson
9a9e2fe43b
Specify and test correct handling for bogus netinfo addrs
2020-10-21 10:30:56 -04:00
Nick Mathewson
743c3167e8
Rename as_message to into_message.
...
According to the API guidelines, "as_" is only for
borrowed->borrowed conversions.
2020-10-21 08:05:33 -04:00