Skip to content

Commit 5340eed

Browse files
committed
Stop using some of the crates
1 parent e538851 commit 5340eed

File tree

8 files changed

+18
-438
lines changed

8 files changed

+18
-438
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ jobs:
4343
command: fmt
4444
args: --manifest-path ./tools/dep-tests/Cargo.toml -- --check
4545

46-
- name: '`cargo fmt --manifest-path ./tools/test-with-generated-opts/Cargo.toml -- --check`'
46+
- name: '`cargo fmt --manifest-path ./tools/test-examples/Cargo.toml -- --check`'
4747
uses: actions-rs/cargo@v1
4848
with:
4949
command: fmt
50-
args: --manifest-path ./tools/test-with-generated-opts/Cargo.toml -- --check
50+
args: --manifest-path ./tools/test-examples/Cargo.toml -- --check
5151

52-
test-with-generated-opts:
53-
name: test-with-generated-opts
52+
test-examples:
53+
name: test-examples
5454
runs-on: ubuntu-18.04
5555

5656
steps:
@@ -75,25 +75,22 @@ jobs:
7575
command: install
7676
args: --git https://github.com/rust-lang-ja/atcoder-rustc-dep-option-generator
7777

78-
- name: '`cargo clippy --all-features --manifest-path ./tools/test-with-generated-opts/Cargo.toml -- -D warnings`'
78+
- name: '`cargo clippy --all-features --manifest-path ./tools/test-examples/Cargo.toml -- -D warnings`'
7979
uses: actions-rs/cargo@v1
8080
with:
8181
command: clippy
82-
args: --all-features --manifest-path ./tools/test-with-generated-opts/Cargo.toml -- -D warnings
82+
args: --all-features --manifest-path ./tools/test-examples/Cargo.toml -- -D warnings
8383

8484
- name: '`cargo build --all-features --release`'
8585
uses: actions-rs/cargo@v1
8686
with:
8787
command: build
8888
args: --all-features --release
8989

90-
- name: '`chmod -R a=rX-w ./target/release`'
91-
run: chmod -R a=rX-w ./target/release
92-
93-
- name: '`cargo test-with-generated-opts`'
90+
- name: '`cargo test-examples`'
9491
uses: actions-rs/cargo@v1
9592
with:
96-
command: test-with-generated-opts
93+
command: test-examples
9794

9895
build:
9996
strategy:

examples/abc084-d.rs

Lines changed: 0 additions & 46 deletions
This file was deleted.

examples/abc120-d.rs

Lines changed: 0 additions & 55 deletions
This file was deleted.

examples/abc129-f.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// https://atcoder.jp/contests/abc129/tasks/abc129_f
22

3-
use derive_more::Display;
43
use ndarray::{array, Array2, LinalgScalar};
54
use num::{PrimInt, Unsigned};
65
use num_derive::{One, Zero};
76

87
use std::cell::Cell;
9-
use std::cmp;
108
use std::io::{self, Read};
119
use std::ops::{Add, Div, Mul, Sub};
10+
use std::{cmp, fmt};
1211

1312
fn main() {
1413
let mut input = read_to_static(io::stdin()).split_whitespace();
@@ -59,7 +58,7 @@ thread_local! {
5958
static MOD: Cell<u64> = Cell::new(0);
6059
}
6160

62-
#[derive(Zero, One, Display, Debug, Clone, Copy)]
61+
#[derive(Zero, One, Debug, Clone, Copy)]
6362
struct Z(u64);
6463

6564
impl Z {
@@ -68,6 +67,12 @@ impl Z {
6867
}
6968
}
7069

70+
impl fmt::Display for Z {
71+
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
72+
fmt::Display::fmt(&self.0, fmt)
73+
}
74+
}
75+
7176
impl Add for Z {
7277
type Output = Self;
7378

examples/abc142-d.rs

Lines changed: 0 additions & 31 deletions
This file was deleted.

examples/apg4b-a.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
11
// https://atcoder.jp/contests/APG4b/tasks/APG4b_a
22

3-
use aho_corasick as _;
43
use alga as _;
5-
use approx as _;
64
use ascii as _;
75
use bitset_fixed as _;
8-
use defmac as _;
9-
use derive_more as _;
10-
use derive_new as _;
116
use either as _;
12-
use euclid as _;
137
use fixedbitset as _;
148
use getrandom as _;
15-
use if_chain as _;
169
use im_rc as _;
1710
use indexmap as _;
1811
use itertools as _;
1912
use itertools_num as _;
2013
use lazy_static as _;
2114
use libm as _;
2215
use maplit as _;
23-
#[allow(unused_imports)]
24-
use matches::matches as _; // https://github.com/rust-lang/rust/issues/66518
25-
use modtype as _;
2616
use nalgebra as _;
2717
use ndarray as _;
28-
use nom as _;
2918
use num as _;
3019
use num_bigint as _;
3120
use num_complex as _;
@@ -37,10 +26,6 @@ use num_traits as _;
3726
use ordered_float as _;
3827
use permutohedron as _;
3928
use petgraph as _;
40-
use primal as _;
41-
use primal_check as _;
42-
use primal_estimate as _;
43-
use primal_sieve as _;
4429
use proconio as _;
4530
use rand as _;
4631
use rand_chacha as _;
@@ -51,18 +36,10 @@ use rand_pcg as _;
5136
use regex as _;
5237
use rustc_hash as _;
5338
use smallvec as _;
54-
use strsim as _;
5539
use superslice as _;
56-
use take_mut as _;
5740
use text_io as _;
58-
use union_find as _;
5941
use whiteread as _;
6042

61-
#[cfg(feature = "jemalloc-ctl")]
62-
use jemalloc_ctl as _;
63-
#[cfg(feature = "jemallocator")]
64-
use jemallocator as _;
65-
6643
fn main() {
6744
println!("Hello, world!");
6845
}

0 commit comments

Comments
 (0)