aya: make ProgramArray::new private

pull/1/head
Alessandro Decina 4 years ago
parent 6682a5ff39
commit 3fddc8165c

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

Loading…
Cancel
Save