From 1865e909560172074403bfbe49aaeb53e6cd189d Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Sat, 26 Apr 2025 02:54:13 +0100 Subject: [PATCH] Improve documentation formatting for Broadcastable trait and element-wise comparison methods --- src/matrix/mat.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix/mat.rs b/src/matrix/mat.rs index 9f0cb09..02a042b 100644 --- a/src/matrix/mat.rs +++ b/src/matrix/mat.rs @@ -202,8 +202,8 @@ pub enum Axis { Row, } -/// A trait to turn either a Matrix or a scalar T into a Vec of -/// length rows*cols (broadcasting the scalar). +/// A trait to turn either a `Matrix` or a scalar T into a `Vec` of +/// length `rows*cols` (broadcasting the scalar). pub trait Broadcastable { fn to_vec(&self, rows: usize, cols: usize) -> Vec; } @@ -223,7 +223,7 @@ impl Broadcastable for Matrix { } /// Generates element-wise eq, lt, le, gt and ge methods -/// where the rhs can be a Matrix or a scalar T. +/// where the rhs can be a `Matrix` or a scalar T. macro_rules! impl_elementwise_cmp { ( $( $method:ident => $op:tt ),* $(,)? @@ -231,7 +231,7 @@ macro_rules! impl_elementwise_cmp { impl Matrix { $( #[doc = concat!("Element-wise comparison `self ", stringify!($op), " rhs`,\n\ - where `rhs` may be a Matrix or a scalar T.")] + where `rhs` may be a `Matrix` or a scalar T.")] pub fn $method(&self, rhs: Rhs) -> BoolMatrix where Rhs: Broadcastable,