unconstrained type parameter in rust

76 Views Asked by At

I'm trying to run this piece of code:

pub struct DataProvider;

impl<T: Config> DataProvider {
    fn details() -> T::AccountId {
        Author::<T>::get().map(|a| a.into())
    }
}

But getting this error:

impl<T: Config> DataProvider {
     ^ unconstrained type parameter

I have tried several things but didn't solved.

0

There are 0 best solutions below