summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Altintop <kim@eagain.io>2023-03-29 18:37:04 +0200
committerKim Altintop <kim@eagain.io>2023-03-29 18:37:04 +0200
commit607a5609f858cd707dca3a936d80a7a9539b4b5a (patch)
tree1f842bc11cb130e611d1521d0d3146cbbf1d7e32
parent1c2e7a3c68fcec8a620e01ac1d4daed87ff7f02d (diff)
Leftovers
- Missing "use" in README - Rename IncompatibleSpecVersion to IncompatibleVersion Signed-off-by: Kim Altintop <kim@eagain.io>
-rw-r--r--README.md2
-rw-r--r--src/metadata/drop.rs6
-rw-r--r--src/metadata/error.rs4
-rw-r--r--src/metadata/identity.rs4
4 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index 1fd7861..634a19e 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ peer-to-peer network topologies.
## Status
-_it_ is **experimental** software. Do not for anything serious.
+_it_ is **experimental** software. Do not use for anything serious.
That said, the [spec](./Documentation/spec.adoc) is thought of as being fairly
stable, in the sense that any amendments will consider backwards compatibility.
diff --git a/src/metadata/drop.rs b/src/metadata/drop.rs
index 1341f68..ae9aefd 100644
--- a/src/metadata/drop.rs
+++ b/src/metadata/drop.rs
@@ -142,7 +142,7 @@ impl Drop {
use error::Verification::*;
if !FMT_VERSION.is_compatible(&self.fmt_version) {
- return Err(IncompatibleSpecVersion);
+ return Err(IncompatibleVersion);
}
let canonical = self.canonicalise()?;
@@ -174,7 +174,7 @@ impl Drop {
}
}
if !FMT_VERSION.is_compatible(&mirrors.signed.fmt_version) {
- return Err(IncompatibleSpecVersion);
+ return Err(IncompatibleVersion);
}
let payload = Sha512::digest(mirrors.signed.canonicalise()?);
@@ -198,7 +198,7 @@ impl Drop {
}
}
if !FMT_VERSION.is_compatible(&alt.signed.fmt_version) {
- return Err(IncompatibleSpecVersion);
+ return Err(IncompatibleVersion);
}
let payload = Sha512::digest(alt.signed.canonicalise()?);
diff --git a/src/metadata/error.rs b/src/metadata/error.rs
index 66173f9..d2040f2 100644
--- a/src/metadata/error.rs
+++ b/src/metadata/error.rs
@@ -20,8 +20,8 @@ pub enum SigId {
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum Verification {
- #[error("incompatible spec version")]
- IncompatibleSpecVersion,
+ #[error("incompatible format version")]
+ IncompatibleVersion,
#[error("canonicalisation failed")]
Canonicalise(#[from] Canonicalise),
diff --git a/src/metadata/identity.rs b/src/metadata/identity.rs
index 9e17213..8ded144 100644
--- a/src/metadata/identity.rs
+++ b/src/metadata/identity.rs
@@ -235,10 +235,10 @@ impl Identity {
where
F: FnMut(&ContentHash) -> io::Result<Signed<Self>>,
{
- use error::Verification::IncompatibleSpecVersion;
+ use error::Verification::IncompatibleVersion;
if !FMT_VERSION.is_compatible(&self.fmt_version) {
- return Err(IncompatibleSpecVersion);
+ return Err(IncompatibleVersion);
}
let canonical = self.canonicalise()?;