Commit Graph

18 Commits

Author SHA1 Message Date
Ian Jackson 42df88d6bf Run maint/add_warning to add lint block everywhere 2023-08-23 10:34:00 +01:00
Ian Jackson 473447a82e Run maint/add_warning to actually apply new lint allows 2023-07-10 13:49:51 +01:00
Nick Mathewson a6dd92843e Allow clippy::unchecked_duration_subtraction in tests
This panics on error, and we're fine with a panic on misbehavior in
tests.
2023-01-27 08:28:02 -05:00
Nick Mathewson bf04641c68 Disable clippy::unlinlined-format-args
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.
2023-01-27 08:27:47 -05:00
Michael van Straten 90a25fa21a Added x86_64-apple-darwin to fallback to "tls-api-openssl" 2023-01-07 12:57:23 +01:00
Michael van Straten 0d05a61381 Temporary fix for #715 and #569 2023-01-05 00:00:47 +01:00
Ian Jackson 82ad9eea5f Allow "clippy::single_char_pattern" in tests.
This lint exists for perf reasons, and this is rarely relevant in
tests.

Using double quoted str is generally cognitively less burdensome.
2022-10-12 13:50:29 +01:00
Ian Jackson 23c352b96b clippy: Consolidate many lints in maint/add_warning
Found these by disabling the nightly dbg macro special case.  Now, we
have a mechanism for globally adding suppressions to tests, we can use
that instead.
2022-06-24 14:23:38 +01:00
Ian Jackson d965dc3f70 clippy: Add standard test lint block to several examples 2022-06-24 14:23:38 +01:00
Nick Mathewson 2f6bc6bdc4 squash! Bump every crate's edition to 2021.
Remove all `use` statements for `TryFrom` and `TryInto`.  These are
now redundant in Rust 2021.
2022-04-25 13:06:26 -04:00
Ian Jackson 66f53b6a9a Merge branch 'main' into 364
Conflicts:
	crates/arti-hyper/examples/hyper.rs

Trivially resolved.  Hyper example still works.
2022-03-01 10:36:02 +00:00
eta 13ba0ea005 arti-client: use PreferredRuntime by default, doc cleanups
This makes using the `PreferredRuntime` the first-class option inside
`arti-client`, freeing users who don't want to think about runtimes from
having to do so.

`TorClient::create_unbootstrapped` and `builder` now automatically
use this runtime, leaving only `builder_custom` for users who wish to
manually specify a runtime.

This lets us clean up the docs a lot: mentions of using custom runtimes
are now relegated to nearer the end of the crate-level documentation,
and we mostly just link to `tor_rtcompat`'s docs to explain more there.
Instead, we take some more time to explain how you use the builder API
to create clients synchronously.

Other doc cleanups included getting rid of the explanation of `TorAddr`
in the main crate-level doc; this is already well-documented elsewhere,
and is something users should discover organically later.

fixes arti#326
2022-02-28 16:41:13 +00:00
Ian Jackson c24c3af81b arti-hyper: Actually support TLS 2022-02-28 13:07:44 +00:00
Ian Jackson c397c772e6 arti-hyper: Provide TLS connector and make space for TLS stream
Add tls_conn field to ArtiHttpConnector (and argument to constructor).
Introduce MaybeHttpsStream and use it in ArtiHttpConnection.
Have the example program pass the native TLS connector.

Currently the TLS connector and the HTTPS variant are not used, but
this commit is very noisy and fomrulaic, so I have split out the code
to use them into a separate commit for easier preparation and review.
2022-02-28 13:07:44 +00:00
Ian Jackson d7d0f52ef6 arti-hyper: Add note about missing https support 2022-02-23 14:35:41 +00:00
Ian Jackson 03de9f727c arti-hyper: Move support code into library
Pure code motion.  (Including motion/copying of "use" lines.)
2022-02-23 14:35:40 +00:00
Ian Jackson 80d8edc51f arti-hyper: Introduce new ConnectionError type
We need this not to use anyhow because we don't want our libraries to
expose anyhow, and this is about to go into the library.
2022-02-23 14:34:53 +00:00
Ian Jackson 0cf9751d7f arti-hyper: Move hyper example from arti-client
Code motion and consequential dependency adjustments.
2022-02-23 13:55:17 +00:00