Alga / genericity issue

I expect the following code to work, since Vector2 (and all Matrix derivatives?) implement alga::linear::FiniteDimVectorSpace.

fn dim<T: alga::linear::FiniteDimVectorSpace>(_x: T) -> usize {
fn main() {
    type V2 = nalgebra::Vector2::<f64>;
    println!("Dim: {}", dim(V2::zeros()));

However, when I try to build this, I get the following error:

the trait `alga::linear::vector::FiniteDimVectorSpace` is not implemented for `nalgebra::base::matrix::Matrix<f64, nalgebra::base::dimension::U2, nalgebra::base::dimension::U1, nalgebra::base::array_storage::ArrayStorage<f64, nalgebra::base::dimension::U2, nalgebra::base::dimension::U1>>`


What version of nalgebra are you using exactly? If it’s the version 0.21 or earlier, the alga trait implementations are not provided unless you enable the alga cargo feature of nalgebra.