Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
Remove a clippy allow with a workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Jul 4, 2019
1 parent da6a2c3 commit 1d4d997
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mruby/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,12 @@ where

/// Provide a falible converter for types that implement an infallible
/// conversion.
// Lint disabled because the suggestion does not compile.
// See: https://github.com/rust-lang/rust-clippy/issues/4140
#[allow(clippy::use_self)]
impl<From, To> TryFromMrb<From> for To
where
To: FromMrb<From>,
{
type From = To::From;
type To = To::To;
type From = <Self as FromMrb<From>>::From;
type To = <Self as FromMrb<From>>::To;

unsafe fn try_from_mrb(interp: &Mrb, value: From) -> Result<Self, Error<Self::From, Self::To>> {
Ok(FromMrb::from_mrb(interp, value))
Expand Down

0 comments on commit 1d4d997

Please sign in to comment.