diff --git a/src/lib.rs b/src/lib.rs index 65fe6c9..aefb46c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,7 @@ pub trait ToMatrix: { } -/// Blanket implementation for ToMatrix for any type that satisfies its bounds. +/// Blanket implementation for [`ToMatrix`] for any type that satisfies its bounds. impl ToMatrix for T where T: Mul + Add @@ -482,12 +482,12 @@ impl Sub for Matrix { /// of specialization system is implemented. /// You can track this issue [here](https://github.com/rust-lang/rust/issues/42721). pub trait MatrixInto { - /// Method for converting a matrix into a matrix of type `Matrix` + /// Method for converting a matrix into a matrix of type [`Matrix`] fn matrix_into(self) -> Matrix; } -/// Blanket implementation of MatrixInto for converting `Matrix` to `Matrix` whenever -/// `S` implements `Into`. +/// Blanket implementation of [`MatrixInto`] for converting [`Matrix`] to [`Matrix`] whenever +/// `T` implements [`From(S)`]. /// # Example /// ``` /// use matrix_basic::Matrix; @@ -499,7 +499,7 @@ pub trait MatrixInto { /// /// assert_eq!(c, b); /// ``` -impl> MatrixInto for Matrix { +impl, S: ToMatrix> MatrixInto for Matrix { fn matrix_into(self) -> Matrix { let mut out = Vec::new(); for row in self.entries {