Loading crates/tor-basic-utils/semver.md 0 → 100644 +2 −0 Original line number Diff line number Diff line BREAKING: Removed flatten(). crates/tor-basic-utils/src/lib.rs +1 −16 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ pub fn iter_join( separator: &str, iter: impl Iterator<Item: fmt::Display> + Clone, ) -> impl fmt::Display { // TODO: This can be replaced with `std::fmt::from_fn()` once stabilised and within our MSRV. // TODO MSRV 1.93: Replace with `std::fmt::from_fn()`? struct Fmt<'a, I: Iterator<Item: fmt::Display> + Clone> { /// Separates items in `iter`. separator: &'a str, Loading Loading @@ -578,21 +578,6 @@ macro_rules! derive_serde_raw { { // ---------------------------------------------------------------------- /// Flatten a `Result<Result<T, E>, E>` into a `Result<T, E>`. /// /// See [`Result::flatten`], which is not available /// at our current MSRV. // TODO MSRV 1.89: When our MSRV is at least 1.89, // remove this function and replace uses with `Result::flatten`. pub fn flatten<T, E>(x: Result<Result<T, E>, E>) -> Result<T, E> { match x { Ok(Ok(x)) => Ok(x), Err(e) | Ok(Err(e)) => Err(e), } } // ---------------------------------------------------------------------- /// Asserts that the type of the expression implements the given trait. /// /// Example: Loading crates/tor-config/src/derive.rs +4 −7 Original line number Diff line number Diff line Loading @@ -2506,17 +2506,15 @@ mod test { #[derive(Deftly, Clone, Debug, PartialEq)] #[derive_deftly(TorConfig)] pub(super) struct CfgEnabled { // MSRV 1.88: Use "true" instead. #[deftly(tor_config( default, cfg = "all()", cfg = "true", cfg_desc = "with eschaton immenentization" ))] pub(super) flower_power: u32, // MSRV 1.88: Use "true" instead. #[deftly(tor_config( default, cfg = "all()", cfg = "true", cfg_reject, cfg_desc = "with eschaton immenentization" ))] Loading @@ -2526,16 +2524,15 @@ mod test { #[derive(Deftly, Clone, Debug, PartialEq)] #[derive_deftly(TorConfig)] pub(super) struct CfgDisabled { // MSRV 1.88: Use "false" instead. #[deftly(tor_config( default, cfg = "any()", cfg = "false", cfg_desc = "with resublimated thiotimoline" ))] pub(super) time_travel: u32, #[deftly(tor_config( default, cfg = "any()", cfg = "false", cfg_reject, cfg_desc = "with resublimated thiotimoline" ))] Loading crates/tor-hsservice/src/config.rs +2 −2 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ pub mod restricted_discovery; // Only exported with pub visibility if the restricted-discovery feature is enabled. #[cfg(not(feature = "restricted-discovery"))] // Use cfg(all()) to prevent this from being documented as // Use cfg(true) to prevent this from being documented as // "Available on non-crate feature `restricted-discovery` only" #[cfg_attr(docsrs, doc(cfg(all())))] #[cfg_attr(docsrs, doc(cfg(true)))] pub(crate) mod restricted_discovery; /// Configuration for one onion service. Loading crates/tor-llcrypto/src/cipher.rs +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ /// /// These ciphers implement the `cipher::StreamCipher` trait, so use /// the [`cipher`](https://docs.rs/cipher) crate to access them. #[cfg_attr(docsrs, doc(cfg(all())))] #[cfg_attr(docsrs, doc(cfg(true)))] #[cfg(not(feature = "with-openssl"))] pub mod aes { // These implement StreamCipher. Loading @@ -22,7 +22,7 @@ pub mod aes { /// /// These ciphers implement the `cipher::StreamCipher` trait, so use /// the [`cipher`](https://docs.rs/cipher) crate to access them. #[cfg_attr(docsrs, doc(cfg(all())))] #[cfg_attr(docsrs, doc(cfg(true)))] #[cfg(feature = "with-openssl")] pub mod aes { use cipher::generic_array::GenericArray; Loading Loading
crates/tor-basic-utils/semver.md 0 → 100644 +2 −0 Original line number Diff line number Diff line BREAKING: Removed flatten().
crates/tor-basic-utils/src/lib.rs +1 −16 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ pub fn iter_join( separator: &str, iter: impl Iterator<Item: fmt::Display> + Clone, ) -> impl fmt::Display { // TODO: This can be replaced with `std::fmt::from_fn()` once stabilised and within our MSRV. // TODO MSRV 1.93: Replace with `std::fmt::from_fn()`? struct Fmt<'a, I: Iterator<Item: fmt::Display> + Clone> { /// Separates items in `iter`. separator: &'a str, Loading Loading @@ -578,21 +578,6 @@ macro_rules! derive_serde_raw { { // ---------------------------------------------------------------------- /// Flatten a `Result<Result<T, E>, E>` into a `Result<T, E>`. /// /// See [`Result::flatten`], which is not available /// at our current MSRV. // TODO MSRV 1.89: When our MSRV is at least 1.89, // remove this function and replace uses with `Result::flatten`. pub fn flatten<T, E>(x: Result<Result<T, E>, E>) -> Result<T, E> { match x { Ok(Ok(x)) => Ok(x), Err(e) | Ok(Err(e)) => Err(e), } } // ---------------------------------------------------------------------- /// Asserts that the type of the expression implements the given trait. /// /// Example: Loading
crates/tor-config/src/derive.rs +4 −7 Original line number Diff line number Diff line Loading @@ -2506,17 +2506,15 @@ mod test { #[derive(Deftly, Clone, Debug, PartialEq)] #[derive_deftly(TorConfig)] pub(super) struct CfgEnabled { // MSRV 1.88: Use "true" instead. #[deftly(tor_config( default, cfg = "all()", cfg = "true", cfg_desc = "with eschaton immenentization" ))] pub(super) flower_power: u32, // MSRV 1.88: Use "true" instead. #[deftly(tor_config( default, cfg = "all()", cfg = "true", cfg_reject, cfg_desc = "with eschaton immenentization" ))] Loading @@ -2526,16 +2524,15 @@ mod test { #[derive(Deftly, Clone, Debug, PartialEq)] #[derive_deftly(TorConfig)] pub(super) struct CfgDisabled { // MSRV 1.88: Use "false" instead. #[deftly(tor_config( default, cfg = "any()", cfg = "false", cfg_desc = "with resublimated thiotimoline" ))] pub(super) time_travel: u32, #[deftly(tor_config( default, cfg = "any()", cfg = "false", cfg_reject, cfg_desc = "with resublimated thiotimoline" ))] Loading
crates/tor-hsservice/src/config.rs +2 −2 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ pub mod restricted_discovery; // Only exported with pub visibility if the restricted-discovery feature is enabled. #[cfg(not(feature = "restricted-discovery"))] // Use cfg(all()) to prevent this from being documented as // Use cfg(true) to prevent this from being documented as // "Available on non-crate feature `restricted-discovery` only" #[cfg_attr(docsrs, doc(cfg(all())))] #[cfg_attr(docsrs, doc(cfg(true)))] pub(crate) mod restricted_discovery; /// Configuration for one onion service. Loading
crates/tor-llcrypto/src/cipher.rs +2 −2 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ /// /// These ciphers implement the `cipher::StreamCipher` trait, so use /// the [`cipher`](https://docs.rs/cipher) crate to access them. #[cfg_attr(docsrs, doc(cfg(all())))] #[cfg_attr(docsrs, doc(cfg(true)))] #[cfg(not(feature = "with-openssl"))] pub mod aes { // These implement StreamCipher. Loading @@ -22,7 +22,7 @@ pub mod aes { /// /// These ciphers implement the `cipher::StreamCipher` trait, so use /// the [`cipher`](https://docs.rs/cipher) crate to access them. #[cfg_attr(docsrs, doc(cfg(all())))] #[cfg_attr(docsrs, doc(cfg(true)))] #[cfg(feature = "with-openssl")] pub mod aes { use cipher::generic_array::GenericArray; Loading