Merge branch 'msrv-1.65' into 'main'

Increase Arti MSRV to 1.65

Closes #815

See merge request tpo/core/arti!1131
This commit is contained in:
Ian Jackson 2023-04-12 09:34:05 +00:00
commit b6533b31aa
52 changed files with 58 additions and 57 deletions

View File

@ -162,7 +162,7 @@ coverage:
minimal-versions:
stage: test
image: rust:1.60
image: rust:1.65
script:
- rustup install nightly
- ./maint/downgrade_dependencies

View File

@ -104,7 +104,7 @@ and obtain streams/sinks usable from async Rust.
## Minimum supported Rust Version
Our current Minimum Supported Rust Version (MSRV) is 1.60.
Our current Minimum Supported Rust Version (MSRV) is 1.65.
When increasing this MSRV, we won't require any Rust version released in the
last six months. (That is, we'll only require Rust versions released at least

View File

@ -2,7 +2,7 @@
name = "arti-bench"
version = "0.8.3"
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
authors = ["The Tor Project, Inc.", "eta <eta@torproject.org>"]
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"

View File

@ -3,7 +3,7 @@ name = "arti-client"
version = "0.8.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Library for connecting to the Tor network as an anonymous client"

View File

@ -3,7 +3,7 @@ name = "arti-config"
version = "0.5.1"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Removed crate. (Tools for configuration management in Arti)"

View File

@ -3,7 +3,7 @@ name = "arti-hyper"
version = "0.8.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Adapter for making anonymous http requests using the Tor network and hyper"

View File

@ -3,7 +3,7 @@ name = "arti-testing"
version = "0.8.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Tools for testing the Arti Tor implementation."

View File

@ -3,7 +3,7 @@ name = "arti"
version = "1.1.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "A rust implementation of the Tor privacy tools."

View File

@ -3,7 +3,7 @@ name = "caret"
version = "0.3.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Macros for declaring non-exhaustive C-style enumerations, with named members"

View File

@ -9,7 +9,7 @@ description = "Ensure that files can only be read or written by trusted users"
keywords = ["fs", "file", "permissions", "ownership", "privacy"]
categories = ["filesystem"]
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
rust-version = "1.60"
rust-version = "1.65"
[features]
default = ["walkdir", "anon_home"]

View File

@ -3,7 +3,7 @@ name = "retry-error"
version = "0.3.1"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "An error type for an operation that can fail more than once"

View File

@ -3,7 +3,7 @@ name = "safelog"
version = "0.2.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Conditionally suppress confidential information from logs"

View File

@ -3,7 +3,7 @@ name = "tor-async-utils"
version = "0.0.1"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Async/futures helpers for use with Tor"

View File

@ -3,7 +3,7 @@ name = "tor-basic-utils"
version = "0.6.0"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "General helpers used by Tor"

View File

@ -3,7 +3,7 @@ name = "tor-bytes"
version = "0.6.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Helpers for encoding and decoding byte-orientted data, as used by Tor"

View File

@ -3,7 +3,7 @@ name = "tor-cell"
version = "0.9.1"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Encode and decode Tor cells and messages"

View File

@ -3,7 +3,7 @@ name = "tor-cert"
version = "0.6.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Non-standard certificate formats used by Tor"

View File

@ -3,7 +3,7 @@ name = "tor-chanmgr"
version = "0.8.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Manage a set of connections to the Tor network"

View File

@ -3,7 +3,7 @@ name = "tor-checkable"
version = "0.4.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Types to ensure that signed or time-bound data is validated before use"

View File

@ -3,7 +3,7 @@ name = "tor-circmgr"
version = "0.7.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Manage a set of anonymous circuits over the Tor network"

View File

@ -3,7 +3,7 @@ name = "tor-config"
version = "0.8.0"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Low-level configuration for the Arti Tor implementation"

View File

@ -61,7 +61,7 @@ impl CmdLine {
.and_then(|range| {
let startline = linepos(range.start);
let endline = linepos(range.end);
(startline == endline).then(|| startline)
(startline == endline).then_some(startline)
})
.and_then(|pos| self.contents.get(pos));

View File

@ -3,7 +3,7 @@ name = "tor-congestion"
version = "0.4.2"
edition = "2021"
authors = ["The Tor Project, Inc.", "eta <eta@torproject.org>"]
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Implementations of Tor network congestion control algorithms"

View File

@ -3,7 +3,7 @@ name = "tor-consdiff"
version = "0.4.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Handle the consensus-diff format used in the Tor directory protocol"

View File

@ -3,7 +3,7 @@ name = "tor-dirclient"
version = "0.6.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Downloads specific Tor network directory objects over the Tor network"

View File

@ -3,7 +3,7 @@ name = "tor-dirmgr"
version = "0.9.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Bootstrap and update an accurate Tor network directory"

View File

@ -198,14 +198,14 @@ where
fn queues_are_empty(bdm: &Bdm) -> Option<()> {
let state = bdm.mgr.lock_only();
(state.running.is_empty() && state.queued.is_empty()).then(|| ())
(state.running.is_empty() && state.queued.is_empty()).then_some(())
}
fn in_results(bdm: &Bdm, bridge: &BridgeKey, wanted: Option<Result<(), ()>>) -> Option<()> {
let bridges = bdm.bridges();
let got = bridges.get(bridge);
let got = got.map(|got| got.as_ref().map(|_| ()).map_err(|_| ()));
(got == wanted).then(|| ())
(got == wanted).then_some(())
}
async fn clear_and_re_request<S>(bdm: &Bdm, events: &mut S, bridge: &BridgeKey)
@ -216,7 +216,7 @@ where
bdm.set_bridges(&[]);
stream_drain_until(3, events, || async {
in_results(bdm, bridge, None)
.and_then(|()| bdm.mgr.lock_only().running.is_empty().then(|| ()))
.and_then(|()| bdm.mgr.lock_only().running.is_empty().then_some(()))
})
.await;
bdm.set_bridges(&[bridge.clone()]);
@ -280,7 +280,7 @@ async fn success() -> Result<(), anyhow::Error> {
bridges
.iter()
.all(|b| bdm.bridges().contains_key(b))
.then(|| ())
.then_some(())
})
.await;
@ -299,7 +299,7 @@ async fn success() -> Result<(), anyhow::Error> {
let () = stream_drain_until(13, &mut events, || async {
bdm.check_consistency(Some(&bridges));
(mock.mstate.lock().await.download_calls == NFAIL).then(|| ())
(mock.mstate.lock().await.download_calls == NFAIL).then_some(())
})
.await;
@ -356,7 +356,7 @@ async fn success() -> Result<(), anyhow::Error> {
// should produce a removed bridge event
let () = stream_drain_until(1, &mut events, || async {
bdm.check_consistency(Some(&bridges));
(!bdm.bridges().contains_key(&removed)).then(|| ())
(!bdm.bridges().contains_key(&removed)).then_some(())
})
.await;
@ -454,7 +454,7 @@ async fn cache() -> Result<(), anyhow::Error> {
mock.sleep.advance(Duration::from_secs(20000)).await;
stream_drain_until(3, &mut events, || async {
(mock.mstate.lock().await.download_calls > 0).then(|| ())
(mock.mstate.lock().await.download_calls > 0).then_some(())
})
.await;

View File

@ -968,7 +968,7 @@ impl<R: Runtime> DirState for GetMicrodescsState<R> {
} else {
collected_microdescs
.is_empty()
.then(move || NetDirChange::AddMicrodescs(collected_microdescs))
.then_some(NetDirChange::AddMicrodescs(collected_microdescs))
}
}
_ => None,

View File

@ -3,7 +3,7 @@ name = "tor-error"
version = "0.4.1"
authors = ["Ian Jackson <iwj@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Provides the unified type-erased error type returned by many (esp. high-level) Tor APIs."

View File

@ -2,7 +2,7 @@
name = "tor-events"
version = "0.4.1"
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
authors = ["The Tor Project, Inc.", "eta <eta@torproject.org>"]
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"

View File

@ -3,7 +3,7 @@ name = "tor-guardmgr"
version = "0.8.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Manage a set of guard relays for Tor network"

View File

@ -73,7 +73,7 @@ impl<'a> BridgeRelay<'a> {
/// If we have enough information about this relay to build a circuit through it,
/// return a BridgeRelayWithDesc for it.
pub fn as_relay_with_desc(&self) -> Option<BridgeRelayWithDesc<'_>> {
self.desc.is_some().then(|| BridgeRelayWithDesc(self))
self.desc.is_some().then_some(BridgeRelayWithDesc(self))
}
}

View File

@ -121,7 +121,7 @@ impl SkewEstimate {
let min_observations = 8;
let skews: Vec<_> = skews
.filter_map(|obs| obs.more_recent_than(cutoff).then(|| obs.skew))
.filter_map(|obs| obs.more_recent_than(cutoff).then_some(obs.skew))
.collect();
if skews.len() < min_observations {
return None;

View File

@ -3,7 +3,7 @@ name = "tor-hsclient"
version = "0.1.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Arti's implementation of an onion service client"

View File

@ -133,7 +133,7 @@ where
} = self.table.get(t_index)
// should be Some, unless data structure corrupted, but don't panic here
?;
(t_k2 == k2).then(|| ())?;
(t_k2 == k2).then_some(())?;
let new_isolation = t_isolation.join(&*isolation)?;
Some((t_index, new_isolation))
}) {

View File

@ -3,7 +3,7 @@ name = "tor-hscrypto"
version = "0.1.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Basic onion service cryptography types used by Aerti"

View File

@ -3,7 +3,7 @@ name = "tor-hsservice"
version = "0.1.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Arti's implementation of an onion service provider"

View File

@ -3,7 +3,7 @@ name = "tor-linkspec"
version = "0.6.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Parts of the Tor protocol that indicate specific relays on the network"

View File

@ -3,7 +3,7 @@ name = "tor-llcrypto"
version = "0.4.4"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Low level cryptography wrappers used by Tor"

View File

@ -3,7 +3,7 @@ name = "tor-netdir"
version = "0.8.1"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Types to represent and use a Tor network directory"

View File

@ -995,7 +995,7 @@ impl NetDir {
fn all_hsdirs(&self) -> impl Iterator<Item = (RouterStatusIdx, Relay<'_>)> {
self.c_relays().iter_enumerated().filter_map(|(rsidx, rs)| {
let relay = self.relay_from_rs_and_rsidx(rs, rsidx);
relay.is_hsdir_for_ring().then(|| ())?;
relay.is_hsdir_for_ring().then_some(())?;
let relay = relay.into_relay()?;
Some((rsidx, relay))
})

View File

@ -3,7 +3,7 @@ name = "tor-netdoc"
version = "0.6.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Network document formats used with the Tor protocols."

View File

@ -3,7 +3,7 @@ name = "tor-persist"
version = "0.6.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Persistent state for the Arti Tor implementation"

View File

@ -3,7 +3,7 @@ name = "tor-proto"
version = "0.9.1"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Asynchronous client-side implementation of the central Tor network protocols"

View File

@ -3,7 +3,7 @@ name = "tor-protover"
version = "0.4.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Implementation for Tor's subprotocol versioning"

View File

@ -3,7 +3,7 @@ name = "tor-ptmgr"
version = "0.2.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Manage a set of pluggable transports to circumvent censorship"

View File

@ -3,7 +3,7 @@ name = "tor-rtcompat"
version = "0.8.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Compatibility layer for asynchronous runtimes, used by Tor"

View File

@ -3,7 +3,7 @@ name = "tor-rtmock"
version = "0.7.2"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Testing mock support for tor-rtcomapt"

View File

@ -3,7 +3,7 @@ name = "tor-socksproto"
version = "0.6.3"
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Encode and decode the SOCKS protocol, as extended in Tor"

View File

@ -3,7 +3,7 @@ name = "tor-units"
version = "0.5.0"
authors = ["Dennis Jackson <git@dennisjj.co.uk>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Provides macros for types which are constrained within a range, ensuring invalid values are unrepresentable."

View File

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
publish = false
authors = ["The Tor Project, Inc.", "Nick Mathewson <nickm@torproject.org>"]
rust-version = "1.60"
rust-version = "1.65"
license = "MIT OR Apache-2.0"
homepage = "https://gitlab.torproject.org/tpo/core/arti/-/wikis/home"
description = "Tool used by arti to enforce certain properties in our Cargo features"

1
semver.md Normal file
View File

@ -0,0 +1 @@
BREAKING: Increased MSRV to 1.65