Skip to content

Use crate visibility for traits #358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/float/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub mod pow;
pub mod sub;

/// Trait for some basic operations on floats
pub trait Float:
pub(crate) trait Float:
Copy
+ PartialEq
+ PartialOrd
Expand Down
8 changes: 4 additions & 4 deletions src/int/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub mod shift;
pub mod udiv;

/// Trait for some basic operations on integers
pub trait Int:
pub(crate) trait Int:
Copy
+ PartialEq
+ PartialOrd
Expand Down Expand Up @@ -190,7 +190,7 @@ int_impl!(i64, u64, 64);
int_impl!(i128, u128, 128);

/// Trait to convert an integer to/from smaller parts
pub trait LargeInt: Int {
pub(crate) trait LargeInt: Int {
type LowHalf: Int;
type HighHalf: Int;

Expand Down Expand Up @@ -232,7 +232,7 @@ large_int!(u128, u64, u64, 64);
large_int!(i128, u64, i64, 64);

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

Expand All @@ -256,7 +256,7 @@ cast_into!(i64);
cast_into!(u128);
cast_into!(i128);

pub trait WideInt: Int {
pub(crate) trait WideInt: Int {
type Output: Int;

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