Commit 9b014fc0 authored by Ian Jackson's avatar Ian Jackson
Browse files

tor-netdoc: Rename NetdocUnverified trait to NetdocParseableUnverified

The NetdocParseableUnverified derive macro implements this
trait (amongst other things).  Traits and derive macros should have
aligned names.

This is only used for parsing, so let's keep the "Parseable" part of
the name.

I don't think the effort of deprecated alias, for downstream
compatibility, is worth it, our compatibility policy notwithstanding.
parent 0cd7be8e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ use tor_netdoc::{
    parse2::{
        self,
        poc::netstatus::{cons, md},
        NetdocParseable, NetdocUnverified, ParseInput,
        NetdocParseable, NetdocParseableUnverified, ParseInput,
    },
};
use tor_rtcompat::PreferredRuntime;
@@ -746,7 +746,7 @@ mod test {
        net::TcpListener,
    };
    use tor_basic_utils::test_rng::testing_rng;
    use tor_netdoc::parse2::NetdocUnverified;
    use tor_netdoc::parse2::NetdocParseableUnverified;

    use crate::database::sql;

+1 −0
Original line number Diff line number Diff line
ADDED: `Display` for `RelayPlatform`
BREAKING: `RelayPlatform::Tor` now stores the platform as `Option<String>`
BREAKING: `NetdocUnverified` trait is now `NetdocParseableUnverified`
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ use crate::parse::parser::{Section, SectionRules};
use crate::parse::tokenize::{ItemResult, NetDocReader};
use crate::parse2::{
    self, ArgumentError, ArgumentStream, ItemArgumentParseable, ItemObjectParseable,
    NetdocUnverified as _, sig_hashes::Sha1WholeKeywordLine,
    NetdocParseableUnverified as _, sig_hashes::Sha1WholeKeywordLine,
};
use crate::types::misc::{Fingerprint, Iso8601TimeSp, RsaPublicParse1Helper, RsaSha1Signature};
use crate::util::str::Extent;
+1 −1
Original line number Diff line number Diff line
@@ -2198,7 +2198,7 @@ mod test {
    use hex_literal::hex;
    #[cfg(feature = "incomplete")]
    use {
        crate::parse2::{NetdocUnverified as _, ParseInput, parse_netdoc},
        crate::parse2::{NetdocParseableUnverified as _, ParseInput, parse_netdoc},
        std::fs,
    };

+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
//! In this case there are three types:
//!
//!   * **`FooUnverified`**: a signed `Foo`, with its signatures, not yet verified.
//!     Implements [`NetdocUnverified`],
//!     Implements [`NetdocParseableUnverified`],
//!     typically by invoking the
//!     [`NetdocUParseablenverified` derive macro](crate::derive_deftly_template_NetdocParseableUnverified)
//!     on `Foo`.
@@ -106,7 +106,7 @@ pub use keyword::KeywordRef;
pub use lex::{ArgumentStream, ItemStream, NoFurtherArguments, UnparsedItem, UnparsedObject};
pub use lines::{Lines, Peeked, StrExt};
pub use signatures::{
    HasUnverifiedParsedBody, NetdocParseableSignatures, NetdocUnverified, SignatureHashInputs,
    HasUnverifiedParsedBody, NetdocParseableSignatures, NetdocParseableUnverified, SignatureHashInputs,
    SignatureHashesAccumulator, SignatureItemParseable, SignaturesData, check_validity_time,
    check_validity_time_tolerance, sig_hashes,
};
Loading