mirror of
https://github.com/rzmk/ladderz.git
synced 2025-12-19 06:59:25 +00:00
docs: make mention of modules section & run rustfmt
This commit is contained in:
parent
98f459c747
commit
3673f6df8e
2 changed files with 10 additions and 8 deletions
|
|
@ -2,6 +2,8 @@
|
|||
//!
|
||||
//! Implementations of mathematical and technical concepts in Rust.
|
||||
//!
|
||||
//! View [the modules section](#modules) for the various implementations based on the subject.
|
||||
//!
|
||||
//! # Example
|
||||
//!
|
||||
//! Here's an example of using the `ladderz` crate to get the factors and factor pairs of a number in sorted order.
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ pub fn is_multiple(x: u32, y: u32) -> bool {
|
|||
pub fn get_multiples_in_range(n: u32, end: u32) -> HashSet<u32> {
|
||||
let mut multiples: HashSet<u32> = HashSet::new();
|
||||
|
||||
for num in n..end+1 {
|
||||
for num in n..end + 1 {
|
||||
if num % n == 0 {
|
||||
multiples.insert(num);
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ mod tests {
|
|||
assert_eq!(result, expected);
|
||||
|
||||
let result_2: bool = false;
|
||||
let expected_2: bool = is_factor(3, 10);
|
||||
let expected_2: bool = is_factor(3, 10);
|
||||
assert_eq!(result_2, expected_2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue