File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ impl<T> fmt::Display for PoisonError<T> {
111
111
}
112
112
113
113
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
114
- impl < T : Send + Reflect > Error for PoisonError < T > {
114
+ impl < T : Reflect > Error for PoisonError < T > {
115
115
fn description ( & self ) -> & str {
116
116
"poisoned lock: another task failed inside"
117
117
}
@@ -158,14 +158,17 @@ impl<T> fmt::Debug for TryLockError<T> {
158
158
}
159
159
160
160
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
161
- impl < T : Send + Reflect > fmt:: Display for TryLockError < T > {
161
+ impl < T > fmt:: Display for TryLockError < T > {
162
162
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
163
- self . description ( ) . fmt ( f)
163
+ match * self {
164
+ TryLockError :: Poisoned ( ..) => "poisoned lock: another task failed inside" ,
165
+ TryLockError :: WouldBlock => "try_lock failed because the operation would block"
166
+ } . fmt ( f)
164
167
}
165
168
}
166
169
167
170
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
168
- impl < T : Send + Reflect > Error for TryLockError < T > {
171
+ impl < T : Reflect > Error for TryLockError < T > {
169
172
fn description ( & self ) -> & str {
170
173
match * self {
171
174
TryLockError :: Poisoned ( ref p) => p. description ( ) ,
You can’t perform that action at this time.
0 commit comments