-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow customize cgroup root path #2411
Conversation
Signed-off-by: fengxsong <[email protected]>
f0700fb
to
4ce591c
Compare
@utam0k PTAL |
@fengxsong May I ask you to make it ready? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2411 +/- ##
==========================================
- Coverage 65.98% 65.92% -0.06%
==========================================
Files 133 133
Lines 16814 16829 +15
==========================================
Hits 11095 11095
- Misses 5719 5734 +15 |
crates/libcgroups/src/common.rs
Outdated
let root = if root_path.is_empty() { | ||
Path::new(DEFAULT_CGROUP_ROOT) | ||
} else { | ||
root_path | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using Option
?
https://doc.rust-lang.org/std/option/enum.Option.html#method.unwrap_or_default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea. I've changed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. I left a comment.
Signed-off-by: fengxsong <[email protected]>
Signed-off-by: fengxsong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution 😍
Signed-off-by: fengxsong <[email protected]>
Signed-off-by: fengxsong <[email protected]>
docs: update docs regarding the changes in #2411
#2392