resolve unresolved error nits of #7617 (#7631)

* handle executor should_panic test better

* Revert "reduce should panic, due to extended error messages"

This reverts commit c0805940184a62cd9302603ad911c3591e70a60c.

* remove excessive constraints

* remove duplicate documentation messages for error variants

* reduce T: constraints to the abs minimum

* whoops

* fewer bounds again

Co-authored-by: Bernhard Schuster <bernhard@parity.io>
This commit is contained in:
Bernhard Schuster
2020-11-30 16:53:33 +01:00
committed by GitHub
parent 1cbfc9257f
commit 4ccf6672b1
7 changed files with 46 additions and 60 deletions
+2 -2
View File
@@ -475,7 +475,7 @@ pub enum CheckedHeader<H, S> {
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error<T> where T: SlotData + Clone + Debug + Send + Sync + 'static {
pub enum Error<T> where T: Debug {
#[error("Slot duration is invalid: {0:?}")]
SlotDurationInvalid(SlotDuration<T>),
}
@@ -493,7 +493,7 @@ impl<T> Deref for SlotDuration<T> {
}
}
impl<T: SlotData + Clone> SlotData for SlotDuration<T> {
impl<T: SlotData> SlotData for SlotDuration<T> {
/// Get the slot duration in milliseconds.
fn slot_duration(&self) -> u64
where T: SlotData,