Skip to content

Commit ab08278

Browse files
committed
Minor fix of compile error, fixes of clippy lints and trait bounds
1 parent e98d760 commit ab08278

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/convert.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ impl<K, T> ResultContext<K, T> for Option<T> {
353353
}
354354
}
355355

356-
impl<K: UniKind, K2: UniKind, T> ResultContext<K2, T> for UniResult<T, K> {
356+
impl<K: UniKind, K2, T> ResultContext<K2, T> for UniResult<T, K> {
357357
fn kind(self, kind: K2) -> UniResult<T, K2> {
358358
self.map_err(|err| err.kind(kind))
359359
}
@@ -402,7 +402,7 @@ impl<K: UniKind, K2: UniKind, T> ResultContext<K2, T> for UniResult<T, K> {
402402
}
403403
}
404404

405-
impl<K2: UniKind, T> ResultContext<K2, T> for UniResult<T, dyn UniKind> {
405+
impl<K2, T> ResultContext<K2, T> for UniResult<T, dyn UniKind> {
406406
fn kind(self, kind: K2) -> UniResult<T, K2> {
407407
self.map_err(|err| err.kind(kind))
408408
}
@@ -450,7 +450,7 @@ impl<K2: UniKind, T> ResultContext<K2, T> for UniResult<T, dyn UniKind> {
450450
}
451451
}
452452

453-
impl<C: 'static, K2: UniKind, T> ResultContext<K2, T> for UniResult<T, dyn UniKindCode<Code = C>> {
453+
impl<C: 'static, K2, T> ResultContext<K2, T> for UniResult<T, dyn UniKindCode<Code = C>> {
454454
fn kind(self, kind: K2) -> UniResult<T, K2> {
455455
self.map_err(|err| err.kind(kind))
456456
}
@@ -498,7 +498,7 @@ impl<C: 'static, K2: UniKind, T> ResultContext<K2, T> for UniResult<T, dyn UniKi
498498
}
499499
}
500500

501-
impl<C: 'static, C2: 'static, K2: UniKind, T> ResultContext<K2, T>
501+
impl<C: 'static, C2: 'static, K2, T> ResultContext<K2, T>
502502
for UniResult<T, dyn UniKindCodes<Code = C, Code2 = C2>>
503503
{
504504
fn kind(self, kind: K2) -> UniResult<T, K2> {

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ impl<C: 'static> UniError<dyn UniKindCode<Code = C>> {
413413
}
414414

415415
/// Wraps the existing error with no additional context and a default kind.
416-
pub fn kind_default<K2: UniKind>(self) -> UniError<K2>
416+
pub fn kind_default<K2>(self) -> UniError<K2>
417417
where
418418
K2: Default,
419419
{

src/inner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<K: UniKind + ?Sized> Display for UniErrorInner<K> {
246246

247247
// *** Cause ***
248248
if let Some(cause) = &self.prev_cause() {
249-
let cause = cause.to_string();
249+
let cause = <Cause as alloc::string::ToString>::to_string(cause);
250250

251251
if !cause.is_empty() {
252252
if context_written || kind_context_written {

0 commit comments

Comments
 (0)