diesel cannot infer type of the type parameter `U` declared on the method

Use load::<i64> to specify the type.


fn count_packages() -> i64 {
    let conn = &mut establish_connection("mysql://root:cpchain@127.0.0.1:3306/cpchain");
    let found = packages.filter(name.eq("name")).filter(version.eq("0.0.1")).count().load::<i64>(conn).expect("Count error");
    found[0]
}