Skip to content

Commit dc848f3

Browse files
nia-eoli-obk
andauthored
Apply suggestions from code review
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
1 parent 1fe8ed8 commit dc848f3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/alloc/isolated_alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ impl IsolatedAlloc {
271271
pub fn pages(&self) -> Vec<usize> {
272272
let mut pages: Vec<_> =
273273
self.page_ptrs.clone().into_iter().map(|p| p.expose_provenance()).collect();
274-
self.huge_ptrs.iter().for_each(|(ptr, size)| {
274+
for (ptr, size) in &self.huge_ptrs {
275275
for i in 0..size / self.page_size {
276276
pages.push(unsafe { ptr.add(i * self.page_size).expose_provenance() });
277277
}

src/shims/trace/child.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ use nix::sys::{ptrace, signal};
66
use nix::unistd;
77

88
use crate::alloc::isolated_alloc::IsolatedAlloc;
9-
use crate::shims::trace::messages::{Confirmation, MemEvents, TraceRequest};
10-
use crate::shims::trace::parent::{ChildListener, sv_loop};
11-
use crate::shims::trace::{FAKE_STACK_SIZE, StartFfiInfo};
9+
use super::messages::{Confirmation, MemEvents, TraceRequest};
10+
use super::parent::{ChildListener, sv_loop};
11+
use super::{FAKE_STACK_SIZE, StartFfiInfo};
1212

1313
static SUPERVISOR: std::sync::Mutex<Option<Supervisor>> = std::sync::Mutex::new(None);
1414

src/shims/trace/parent.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use ipc_channel::ipc;
22
use nix::sys::{ptrace, signal, wait};
33
use nix::unistd;
44

5-
use crate::shims::trace::StartFfiInfo;
6-
use crate::shims::trace::messages::{Confirmation, MemEvents, TraceRequest};
5+
use super::StartFfiInfo;
6+
use super::messages::{Confirmation, MemEvents, TraceRequest};
77

88
/// The flags to use when calling `waitid()`.
99
/// Since bitwise or on the nix version of these flags is implemented as a trait,

0 commit comments

Comments
 (0)