Skip to content

Commit

Permalink
Change MSRV to 1.70.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Oct 20, 2023
1 parent 0888b5d commit f8cd581
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 21 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ jobs:
- name: Run tests feature variation
run: cargo test --locked --target ${{ matrix.target }} --no-default-features

msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.70.0
targets: x86_64-unknown-linux-gnu
- name: Run build
run: cargo build

rustfmt:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions src/columns/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl Column for Group {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Some(ref status) = proc.curr_status {
let gid = status.egid;
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{gid}")
Expand All @@ -62,7 +62,7 @@ impl Column for Group {
fn add(&mut self, proc: &ProcessInfo) {
let gid = proc.curr_task.pbsd.pbi_gid;
let fmt_content =
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{}", gid)
Expand Down Expand Up @@ -108,7 +108,7 @@ impl Column for Group {
fn add(&mut self, proc: &ProcessInfo) {
let gid = proc.curr_proc.info.svgid;
let fmt_content =
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{gid}")
Expand Down
2 changes: 1 addition & 1 deletion src/columns/group_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Column for GroupFs {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Some(ref status) = proc.curr_status {
let gid = status.fgid;
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{gid}")
Expand Down
6 changes: 3 additions & 3 deletions src/columns/group_real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Column for GroupReal {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Some(ref status) = proc.curr_status {
let gid = status.rgid;
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{gid}")
Expand All @@ -55,7 +55,7 @@ impl Column for GroupReal {
fn add(&mut self, proc: &ProcessInfo) {
let gid = proc.curr_task.pbsd.pbi_rgid;
let fmt_content =
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{}", gid)
Expand All @@ -74,7 +74,7 @@ impl Column for GroupReal {
fn add(&mut self, proc: &ProcessInfo) {
let gid = proc.curr_proc.info.rgid;
let fmt_content =
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{gid}")
Expand Down
6 changes: 3 additions & 3 deletions src/columns/group_saved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Column for GroupSaved {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Some(ref status) = proc.curr_status {
let gid = status.sgid;
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{gid}")
Expand All @@ -55,7 +55,7 @@ impl Column for GroupSaved {
fn add(&mut self, proc: &ProcessInfo) {
let gid = proc.curr_task.pbsd.pbi_svgid;
let fmt_content =
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{}", gid)
Expand All @@ -74,7 +74,7 @@ impl Column for GroupSaved {
fn add(&mut self, proc: &ProcessInfo) {
let gid = proc.curr_proc.info.svgid;
let fmt_content =
if let Some(group) = USERS_CACHE.with_borrow_mut(|x| x.get_group_by_gid(gid)) {
if let Some(group) = USERS_CACHE.with(|x| x.borrow_mut().get_group_by_gid(gid)) {
format!("{}", group.name().to_string_lossy())
} else {
format!("{gid}")
Expand Down
6 changes: 3 additions & 3 deletions src/columns/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl User {
#[cfg(any(target_os = "linux", target_os = "android"))]
impl Column for User {
fn add(&mut self, proc: &ProcessInfo) {
let user = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(proc.curr_proc.owner()));
let user = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(proc.curr_proc.owner()));
let fmt_content = if let Some(user) = user {
format!("{}", user.name().to_string_lossy())
} else {
Expand All @@ -58,7 +58,7 @@ impl Column for User {
fn add(&mut self, proc: &ProcessInfo) {
let uid = proc.curr_task.pbsd.pbi_uid;
let fmt_content =
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{}", uid)
Expand Down Expand Up @@ -96,7 +96,7 @@ impl Column for User {
fn add(&mut self, proc: &ProcessInfo) {
let uid = proc.curr_proc.info.uid;
let fmt_content =
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{}", uid)
Expand Down
2 changes: 1 addition & 1 deletion src/columns/user_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Column for UserFs {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Some(ref status) = proc.curr_status {
let uid = status.fuid;
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{uid}")
Expand Down
2 changes: 1 addition & 1 deletion src/columns/user_login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl UserLogin {
impl Column for UserLogin {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Ok(uid) = proc.curr_proc.loginuid() {
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else if uid == UID_NOT_SET {
String::new()
Expand Down
6 changes: 3 additions & 3 deletions src/columns/user_real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Column for UserReal {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Some(ref status) = proc.curr_status {
let uid = status.ruid;
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{uid}")
Expand All @@ -55,7 +55,7 @@ impl Column for UserReal {
fn add(&mut self, proc: &ProcessInfo) {
let uid = proc.curr_task.pbsd.pbi_ruid;
let fmt_content =
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{}", uid)
Expand All @@ -75,7 +75,7 @@ impl Column for UserReal {
fn add(&mut self, proc: &ProcessInfo) {
let uid = proc.curr_proc.info.ruid;
let fmt_content =
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{}", uid)
Expand Down
6 changes: 3 additions & 3 deletions src/columns/user_saved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Column for UserSaved {
fn add(&mut self, proc: &ProcessInfo) {
let fmt_content = if let Some(ref status) = proc.curr_status {
let uid = status.suid;
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{uid}")
Expand All @@ -55,7 +55,7 @@ impl Column for UserSaved {
fn add(&mut self, proc: &ProcessInfo) {
let uid = proc.curr_task.pbsd.pbi_svuid;
let fmt_content =
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{}", uid)
Expand All @@ -75,7 +75,7 @@ impl Column for UserSaved {
fn add(&mut self, proc: &ProcessInfo) {
let uid = proc.curr_proc.info.svuid;
let fmt_content =
if let Some(user) = USERS_CACHE.with_borrow_mut(|x| x.get_user_by_uid(uid)) {
if let Some(user) = USERS_CACHE.with(|x| x.borrow_mut().get_user_by_uid(uid)) {
format!("{}", user.name().to_string_lossy())
} else {
format!("{}", uid)
Expand Down

0 comments on commit f8cd581

Please sign in to comment.