Skip to content

Commit

Permalink
Solve p21, p23 in rust
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 23, 2024
1 parent bc0ab16 commit 58daf21
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Olivia's Project Euler Solutions
| | GraalPy 23.1+ |br| | | |CodeQL| |br| |
| | Browser [#]_ | | |PythonLint| |
+------------+----------------------------+--------+-------------------+
| Rust | 1.69+ |br| | 28 | |Rust| |br| |
| Rust | 1.69+ |br| | 30 | |Rust| |br| |
| | Browser [#]_ | | |Rs-Cov| |br| |
| | | | |RustClippy| |
+------------+----------------------------+--------+-------------------+
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ Problems Solved
+-----------+------------+------------+------------+------------+------------+------------+------------+
|:prob:`20` |:c-d:`0020` |:cp-d:`0020`|:cs-d:`0020`|:ja-d:`0020`|:js-d:`0020`|:py-d:`0020`|:rs-d:`0020`|
+-----------+------------+------------+------------+------------+------------+------------+------------+
|:prob:`21` | | | | | |:py-d:`0021`| |
|:prob:`21` | | | | | |:py-d:`0021`|:rs-d:`0021`|
+-----------+------------+------------+------------+------------+------------+------------+------------+
|:prob:`22` |:c-d:`0022` |:cp-d:`0022`|:cs-d:`0022`|:ja-d:`0022`|:js-d:`0022`|:py-d:`0022`|:rs-d:`0022`|
+-----------+------------+------------+------------+------------+------------+------------+------------+
|:prob:`23` | | | | |:js-d:`0023`|:py-d:`0023`| |
|:prob:`23` | | | | |:js-d:`0023`|:py-d:`0023`|:rs-d:`0023`|
+-----------+------------+------------+------------+------------+------------+------------+------------+
|:prob:`24` | | | | | |:py-d:`0024`|:rs-d:`0024`|
+-----------+------------+------------+------------+------------+------------+------------+------------+
Expand Down
2 changes: 2 additions & 0 deletions rust/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ Problems Solved
- ☒ `18 <./src/p0018.rs>`__
- ☒ `19 <./src/p0019.rs>`__
- ☒ `20 <./src/p0020.rs>`__
- ☒ `21 <./src/p0021.rs>`__
- ☒ `22 <./src/p0022.rs>`__
- ☒ `23 <./src/p0023.rs>`__
- ☒ `24 <./src/p0024.rs>`__
- ☒ `27 <./src/p0027.rs>`__
- ☒ `34 <./src/p0034.rs>`__
Expand Down
6 changes: 3 additions & 3 deletions rust/src/include/problems.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use seq_macro::seq;

use crate::include::utils::Answer;
seq!(N in 0001..=0020 {
seq!(N in 0001..=0024 {
use crate::p~N::p~N;
});
use crate::p0022::p0022;
use crate::p0024::p0024;
use crate::p0027::p0027;
use crate::p0034::p0034;
use crate::p0069::p0069;
Expand Down Expand Up @@ -40,7 +38,9 @@ pub fn get_problem<'b>(n: usize) -> Option<ProblemRef<'b>> {
18 => Some(( &18, p0018, false)),
19 => Some(( &19, p0019, false)),
20 => Some(( &20, p0020, false)),
21 => Some(( &21, p0021, false)),
22 => Some(( &22, p0022, false)),
23 => Some(( &23, p0023, false)),
24 => Some(( &24, p0024, false)),
27 => Some(( &27, p0027, false)),
34 => Some(( &34, p0034, false)),
Expand Down
4 changes: 1 addition & 3 deletions rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,11 @@ fn main() {
}

#[cfg(test)]
seq!(N in 01..=20 {
seq!(N in 01..=24 {
#[rstest]
#(
#[case::problem_~N(N)]
)*
#[case::problem_22(22)]
#[case::problem_24(24)]
#[case::problem_27(27)]
#[case::problem_34(34)]
#[case::problem_69(69)]
Expand Down

0 comments on commit 58daf21

Please sign in to comment.