mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Merge pull request #133 from nxfs/controllers-parsing
controllers parsing is resilient to trailing newline
This commit is contained in:
@@ -522,7 +522,7 @@ fn supported_controllers() -> Vec<String> {
|
||||
let ret = fs::read_to_string(p.as_str());
|
||||
ret.unwrap_or_default()
|
||||
.split(' ')
|
||||
.map(|x| x.to_string())
|
||||
.map(|x| x.trim().to_string())
|
||||
.collect::<Vec<String>>()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user