Skip to content

Commit 7c92564

Browse files
committed
Get rid of absolute paths
1 parent a8c306d commit 7c92564

11 files changed

+23
-25
lines changed

src/convolution.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ macro_rules! modulus {
88
const VALUE: u32 = $name as _;
99
const HINT_VALUE_IS_PRIME: bool = true;
1010

11-
fn butterfly_cache() -> &'static ::std::thread::LocalKey<::std::cell::RefCell<::std::option::Option<crate::modint::ButterflyCache<Self>>>> {
11+
fn butterfly_cache() -> &'static ::std::thread::LocalKey<::std::cell::RefCell<::std::option::Option<$crate::modint::ButterflyCache<Self>>>> {
1212
thread_local! {
13-
static BUTTERFLY_CACHE: ::std::cell::RefCell<::std::option::Option<crate::modint::ButterflyCache<$name>>> = ::std::default::Default::default();
13+
static BUTTERFLY_CACHE: ::std::cell::RefCell<::std::option::Option<$crate::modint::ButterflyCache<$name>>> = ::std::default::Default::default();
1414
}
1515
&BUTTERFLY_CACHE
1616
}
@@ -19,7 +19,7 @@ macro_rules! modulus {
1919
};
2020
}
2121

22-
use crate::{
22+
use super::{
2323
internal_bit, internal_math,
2424
modint::{ButterflyCache, Modulus, RemEuclidU32, StaticModInt},
2525
};
@@ -232,10 +232,7 @@ fn prepare<M: Modulus>() -> ButterflyCache<M> {
232232

233233
#[cfg(test)]
234234
mod tests {
235-
use crate::{
236-
modint::{Mod998244353, Modulus, StaticModInt},
237-
RemEuclidU32,
238-
};
235+
use super::super::modint::{Mod998244353, Modulus, RemEuclidU32, StaticModInt};
239236
use rand::{rngs::ThreadRng, Rng as _};
240237
use std::{
241238
convert::{TryFrom, TryInto as _},

src/internal_math.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ pub(crate) fn primitive_root(m: i32) -> i32 {
239239
mod tests {
240240
#![allow(clippy::unreadable_literal)]
241241
#![allow(clippy::cognitive_complexity)]
242-
use crate::internal_math::{inv_gcd, is_prime, pow_mod, primitive_root, safe_mod, Barrett};
242+
use super::{inv_gcd, is_prime, pow_mod, primitive_root, safe_mod, Barrett};
243243
use std::collections::HashSet;
244244

245245
#[test]

src/internal_queue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<T> SimpleQueue<T> {
5151

5252
#[cfg(test)]
5353
mod test {
54-
use crate::internal_queue::SimpleQueue;
54+
use super::SimpleQueue;
5555

5656
#[allow(clippy::cognitive_complexity)]
5757
#[test]

src/lazysegtree.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::internal_bit::ceil_pow2;
2-
use crate::Monoid;
1+
use super::internal_bit::ceil_pow2;
2+
use super::Monoid;
33

44
pub trait MapMonoid {
55
type M: Monoid;
@@ -314,7 +314,8 @@ where
314314

315315
#[cfg(test)]
316316
mod tests {
317-
use crate::{LazySegtree, MapMonoid, Max};
317+
use super::super::segtree::Max;
318+
use super::{LazySegtree, MapMonoid};
318319

319320
struct MaxAdd;
320321
impl MapMonoid for MaxAdd {

src/math.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::internal_math;
1+
use super::internal_math;
22

33
use std::mem::swap;
44

src/maxflow.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(dead_code)]
2-
use crate::internal_queue::SimpleQueue;
3-
use crate::internal_type_traits::Integral;
2+
use super::internal_queue::SimpleQueue;
3+
use super::internal_type_traits::Integral;
44
use std::cmp::min;
55
use std::iter;
66

@@ -224,7 +224,7 @@ struct _Edge<Cap> {
224224

225225
#[cfg(test)]
226226
mod test {
227-
use crate::{Edge, MfGraph};
227+
use super::{Edge, MfGraph};
228228

229229
#[test]
230230
fn test_max_flow_wikipedia() {

src/mincostflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::internal_type_traits::Integral;
1+
use super::internal_type_traits::Integral;
22

33
pub struct MinCostFlowEdge<T> {
44
pub from: usize,

src/modint.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
//! [`ModInt998244353`]: ./type.ModInt998244353.html
4949
//! [`ModInt`]: ./type.ModInt.html
5050
51-
use crate::internal_math;
51+
use super::internal_math;
5252
use std::{
5353
cell::RefCell,
5454
convert::{Infallible, TryInto as _},
@@ -1050,7 +1050,7 @@ impl_folding! {
10501050

10511051
#[cfg(test)]
10521052
mod tests {
1053-
use crate::modint::ModInt1000000007;
1053+
use super::ModInt1000000007;
10541054

10551055
#[test]
10561056
fn static_modint_new() {

src/scc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::internal_scc;
1+
use super::internal_scc;
22

33
pub struct SccGraph {
44
internal: internal_scc::SccGraph,

src/segtree.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::internal_bit::ceil_pow2;
2-
use crate::internal_type_traits::{BoundedAbove, BoundedBelow, One, Zero};
1+
use super::internal_bit::ceil_pow2;
2+
use super::internal_type_traits::{BoundedAbove, BoundedBelow, One, Zero};
33
use std::cmp::{max, min};
44
use std::convert::Infallible;
55
use std::marker::PhantomData;
@@ -238,8 +238,8 @@ where
238238

239239
#[cfg(test)]
240240
mod tests {
241-
use crate::segtree::Max;
242-
use crate::Segtree;
241+
use super::super::Segtree;
242+
use super::Max;
243243

244244
#[test]
245245
fn test_max_segtree() {

src/twosat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::internal_scc;
1+
use super::internal_scc;
22

33
pub struct TwoSat {
44
n: usize,

0 commit comments

Comments
 (0)