Sfoglia il codice sorgente

aya: make ProgramArray::new private

Alessandro Decina 4 anni fa
parent
commit
3fddc8165c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      aya/src/maps/program_array.rs

+ 1 - 1
aya/src/maps/program_array.rs

@@ -17,7 +17,7 @@ pub struct ProgramArray<T: Deref<Target = Map>> {
 }
 
 impl<T: Deref<Target = Map>> ProgramArray<T> {
-    pub fn new(map: T) -> Result<ProgramArray<T>, MapError> {
+    fn new(map: T) -> Result<ProgramArray<T>, MapError> {
         let map_type = map.obj.def.map_type;
         if map_type != BPF_MAP_TYPE_PROG_ARRAY as u32 {
             return Err(MapError::InvalidMapType {