Skip to content

Commit d0ea076

Browse files
Tomasz Miąskotmiasko
Tomasz Miąsko
andauthored
Use crate visibility for traits (#358)
Co-authored-by: Tomasz Miąsko <[email protected]>
1 parent c2eba93 commit d0ea076

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/float/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub mod pow;
1313
pub mod sub;
1414

1515
/// Trait for some basic operations on floats
16-
pub trait Float:
16+
pub(crate) trait Float:
1717
Copy
1818
+ PartialEq
1919
+ PartialOrd

src/int/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub mod shift;
1919
pub mod udiv;
2020

2121
/// Trait for some basic operations on integers
22-
pub trait Int:
22+
pub(crate) trait Int:
2323
Copy
2424
+ PartialEq
2525
+ PartialOrd
@@ -190,7 +190,7 @@ int_impl!(i64, u64, 64);
190190
int_impl!(i128, u128, 128);
191191

192192
/// Trait to convert an integer to/from smaller parts
193-
pub trait LargeInt: Int {
193+
pub(crate) trait LargeInt: Int {
194194
type LowHalf: Int;
195195
type HighHalf: Int;
196196

@@ -232,7 +232,7 @@ large_int!(u128, u64, u64, 64);
232232
large_int!(i128, u64, i64, 64);
233233

234234
/// Trait to express (possibly lossy) casting of integers
235-
pub trait CastInto<T: Copy>: Copy {
235+
pub(crate) trait CastInto<T: Copy>: Copy {
236236
fn cast(self) -> T;
237237
}
238238

@@ -256,7 +256,7 @@ cast_into!(i64);
256256
cast_into!(u128);
257257
cast_into!(i128);
258258

259-
pub trait WideInt: Int {
259+
pub(crate) trait WideInt: Int {
260260
type Output: Int;
261261

262262
fn wide_mul(self, other: Self) -> (Self, Self);

0 commit comments

Comments
 (0)