Skip to content

Commit 0f6387c

Browse files
committed
Add a comment for Integer trait
1 parent 56a6f71 commit 0f6387c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mincostflow.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct MinCostFlowGraph<T> {
1414

1515
impl<T> MinCostFlowGraph<T>
1616
where
17-
T: Number + std::ops::Neg<Output = T>,
17+
T: Integer + std::ops::Neg<Output = T>,
1818
{
1919
pub fn new(n: usize) -> Self {
2020
Self {
@@ -180,8 +180,8 @@ struct _Edge<T> {
180180
cost: T,
181181
}
182182

183-
// TODO migrate to common type
184-
pub trait Number:
183+
// TODO After we have Integer trait in [crate::internal_type_traits], remove this trait and use the new one
184+
pub trait Integer:
185185
Copy
186186
+ Ord
187187
+ std::ops::Not<Output = Self>
@@ -217,7 +217,7 @@ pub trait Number:
217217
mod tests {
218218
use super::*;
219219

220-
impl Number for i64 {
220+
impl Integer for i64 {
221221
fn zero() -> Self {
222222
0
223223
}

0 commit comments

Comments
 (0)