File tree 3 files changed +6
-15
lines changed
3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change 7
7
// except according to those terms.
8
8
9
9
use super :: Layout ;
10
- use super :: LayoutPriv ;
11
10
12
11
const LAYOUT_NAMES : & [ & str ] = & [ "C" , "F" ] ;
13
12
Original file line number Diff line number Diff line change 1
1
mod layoutfmt;
2
2
3
- // public but users don't interact with it
3
+ // public struct but users don't interact with it
4
4
#[ doc( hidden) ]
5
5
/// Memory layout description
6
6
#[ derive( Copy , Clone ) ]
7
7
pub struct Layout ( u32 ) ;
8
8
9
- pub trait LayoutPriv : Sized {
10
- fn new ( x : u32 ) -> Self ;
11
- fn and ( self , flag : Self ) -> Self ;
12
- fn is ( self , flag : u32 ) -> bool ;
13
- fn flag ( self ) -> u32 ;
14
- }
15
-
16
- impl LayoutPriv for Layout {
9
+ impl Layout {
17
10
#[ inline( always) ]
18
- fn new ( x : u32 ) -> Self {
11
+ pub ( crate ) fn new ( x : u32 ) -> Self {
19
12
Layout ( x)
20
13
}
21
14
22
15
#[ inline( always) ]
23
- fn is ( self , flag : u32 ) -> bool {
16
+ pub ( crate ) fn is ( self , flag : u32 ) -> bool {
24
17
self . 0 & flag != 0
25
18
}
26
19
#[ inline( always) ]
27
- fn and ( self , flag : Layout ) -> Layout {
20
+ pub ( crate ) fn and ( self , flag : Layout ) -> Layout {
28
21
Layout ( self . 0 & flag. 0 )
29
22
}
30
23
31
24
#[ inline( always) ]
32
- fn flag ( self ) -> u32 {
25
+ pub ( crate ) fn flag ( self ) -> u32 {
33
26
self . 0
34
27
}
35
28
}
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ use crate::Layout;
18
18
use crate :: NdIndex ;
19
19
20
20
use crate :: indexes:: { indices, Indices } ;
21
- use crate :: layout:: LayoutPriv ;
22
21
use crate :: layout:: { CORDER , FORDER } ;
23
22
24
23
/// Return if the expression is a break value.
You can’t perform that action at this time.
0 commit comments