Merge pull request #370 from erickt/fix-error

Actually include roles in error messages
diff --git a/tuf/Cargo.toml b/tuf/Cargo.toml
index c25f33e..fee6e79 100644
--- a/tuf/Cargo.toml
+++ b/tuf/Cargo.toml
@@ -1,7 +1,7 @@
 [package]
 name = "tuf"
 edition = "2018"
-version = "0.3.0-beta8"
+version = "0.3.0-beta9"
 authors = [ "heartsucker <heartsucker@autistici.org>", "Erick Tryzelaar <etryzelaar@google.com>" ]
 description = "Library for The Update Framework (TUF)"
 homepage = "https://github.com/theupdateframework/rust-tuf"
diff --git a/tuf/src/error.rs b/tuf/src/error.rs
index b556b00..5bd8bd4 100644
--- a/tuf/src/error.rs
+++ b/tuf/src/error.rs
@@ -120,7 +120,7 @@
     MetadataVersionMustBeSmallerThanMaxU32(MetadataPath),
 
     /// The metadata was not signed with enough valid signatures.
-    #[error("metadata {0} signature threshold not met: {number_of_valid_signatures}/{threshold}")]
+    #[error("metadata {role} signature threshold not met: {number_of_valid_signatures}/{threshold}")]
     MetadataMissingSignatures {
         /// The signed metadata.
         role: MetadataPath,
@@ -131,7 +131,7 @@
     },
 
     /// Attempted to update metadata with an older version.
-    #[error("attempted to roll back metadata {0} from version {trusted_version} to {new_version}")]
+    #[error("attempted to roll back metadata {role} from version {trusted_version} to {new_version}")]
     AttemptedMetadataRollBack {
         /// The metadata.
         role: MetadataPath,