is_square() 需要確認邊是否相等,因此邊的型別一定要實作trait [ core::cmp::PartialEq ]PartialEq: impl<T: PartialEq> Rectangle<T> { ... } 現在,一個rectangle 可用 ...
確定! 回上一頁