]> git.lizzy.rs Git - rust.git/commit
Rename Integer trait `divides` to `is_multiple_of`.
authorJonas Hietala <tradet.h@gmail.com>
Mon, 28 Jul 2014 14:03:01 +0000 (16:03 +0200)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 29 Jul 2014 22:43:52 +0000 (15:43 -0700)
commit59a91280084347ced9a27c8d05a211f50fe90737
tree290d834d666b781d6c5411442915af6f132da9a6
parentef7d3e13e258258ec427889d3b047f0b7fda33c7
Rename Integer trait `divides` to `is_multiple_of`.

It is being changed because the previous wording was ambiguous.
`a.divides(b)` implied `a % b == 0` but it sounds like the other way
around. `9.divides(&3) == true` but we might read that as
"does 9 divide 3?".  It has been renamed to sidestep the ambiguity.

Work around the change by using `is_multiple_of` instead.

[breaking-change]
src/libnum/bigint.rs
src/libnum/integer.rs