@@ -20,8 +20,8 @@ pub(crate) const AT_HWCAP2: usize = 26;
2020/// If an entry cannot be read all the bits in the bitfield are set to zero.
2121/// This should be interpreted as all the features being disabled.
2222#[ derive( Debug , Copy , Clone ) ]
23- #[ cfg_attr ( test , derive( PartialEq ) ) ]
24- pub ( crate ) struct AuxVec {
23+ #[ derive( PartialEq ) ]
24+ pub struct AuxVec {
2525 pub hwcap : usize ,
2626 #[ cfg( any(
2727 target_arch = "aarch64" ,
@@ -68,7 +68,7 @@ pub(crate) struct AuxVec {
6868/// [auxvec_h]: https://github.com/torvalds/linux/blob/master/include/uapi/linux/auxvec.h
6969/// [auxv_docs]: https://docs.rs/auxv/0.3.3/auxv/
7070/// [`getauxval`]: https://man7.org/linux/man-pages/man3/getauxval.3.html
71- pub ( crate ) fn auxv ( ) -> Result < AuxVec , ( ) > {
71+ pub fn auxv ( ) -> Result < AuxVec , ( ) > {
7272 // Try to call a getauxval function.
7373 if let Ok ( hwcap) = getauxval ( AT_HWCAP ) {
7474 // Targets with only AT_HWCAP:
@@ -146,7 +146,7 @@ fn getauxval(key: usize) -> Result<usize, ()> {
146146
147147/// Tries to read the auxiliary vector from the `file`. If this fails, this
148148/// function returns `Err`.
149- pub ( super ) fn auxv_from_file ( file : & str ) -> Result < AuxVec , alloc:: string:: String > {
149+ pub fn auxv_from_file ( file : & str ) -> Result < AuxVec , alloc:: string:: String > {
150150 let bytes = super :: read_file ( file) ?;
151151
152152 // See <https://github.com/torvalds/linux/blob/v5.15/include/uapi/linux/auxvec.h>.
@@ -212,6 +212,3 @@ fn auxv_from_buf(buf: &[usize]) -> Result<AuxVec, alloc::string::String> {
212212 let _ = buf;
213213 Err ( alloc:: string:: String :: from ( "hwcap not found" ) )
214214}
215-
216- #[ cfg( test) ]
217- mod tests;
0 commit comments