Skip to content

Commit

Permalink
slabinfo: remove version field of SlabInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Krysztal112233 committed Apr 13, 2024
1 parent 152224f commit b3006e7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/uu/slabtop/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use std::{

#[derive(Debug, Default)]
pub struct SlabInfo {
#[allow(unused)] // for slabinfo checking
pub(crate) version: String,
pub(crate) meta: Vec<String>,
pub(crate) data: Vec<(String, Vec<u64>)>,
}
Expand All @@ -30,15 +28,11 @@ impl SlabInfo {
pub(crate) fn parse(content: String) -> Option<SlabInfo> {
let mut lines: Vec<&str> = content.lines().collect();

let version = parse_version(lines.remove(0))?;
let _ = parse_version(lines.remove(0))?;
let meta = parse_meta(lines.remove(0));
let data: Vec<(String, Vec<u64>)> = lines.into_iter().filter_map(parse_data).collect();

Some(SlabInfo {
version,
meta,
data,
})
Some(SlabInfo { meta, data })
}

pub fn fetch(&self, name: &str, meta: &str) -> Option<u64> {
Expand Down

0 comments on commit b3006e7

Please sign in to comment.