-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Brought in the restructuring which happened on the default branch.
- Loading branch information
Showing
99 changed files
with
9,201 additions
and
2,151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
name: lint | ||
on: [push, workflow_dispatch] | ||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/lint.yml' | ||
- '**.rs' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo clippy | ||
- run: cargo clippy -- --deny clippy::all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
name: style | ||
on: [push, workflow_dispatch] | ||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/style.yml' | ||
- 'rustfmt.toml' | ||
- '**.rs' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
style: | ||
name: style | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: cargo fmt --check | ||
- run: cargo fmt -v --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/target | ||
Cargo.lock | ||
/.vscode | ||
/Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Code of Conduct | ||
|
||
Just be cool (optional). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# Contributing | ||
|
||
Not accepting pull requests, since this is my personal learning project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM --platform=linux/i386 alpine:3.19 | ||
RUN apk add cargo | ||
WORKDIR /project-euler | ||
WORKDIR /github.com/tfpf/project-euler | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use project_euler::utils; | ||
|
||
pub fn is_prime(c: &mut criterion::Criterion) { | ||
c.bench_function("is_prime", |b| { | ||
b.iter(|| (0..10i64.pow(5)).map(utils::is_prime).count()) | ||
}); | ||
} | ||
|
||
pub fn sieve_of_atkin(c: &mut criterion::Criterion) { | ||
c.bench_function("sieve_of_atkin", |b| { | ||
b.iter(|| utils::SieveOfAtkin::new(10usize.pow(6))) | ||
}); | ||
} | ||
|
||
criterion::criterion_group!(benches, is_prime, sieve_of_atkin); | ||
criterion::criterion_main!(benches); |
Oops, something went wrong.