Skip to content

Commit

Permalink
Apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftSpider committed Jan 30, 2025
1 parent 5e06ede commit e740a04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/shims/files.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::any::Any;
use std::collections::BTreeMap;
use std::fs::{File, Metadata};
use std::io::{IsTerminal, Read, SeekFrom, Seek, Write};
use std::io::{IsTerminal, Read, Seek, SeekFrom, Write};
use std::marker::CoercePointee;
use std::ops::Deref;
use std::rc::{Rc, Weak};
Expand Down Expand Up @@ -410,6 +410,9 @@ impl FileDescription for NullOutput {
}
}

/// Internal type of a file-descriptor - this is what [`FdTable`] expects
pub type FdNum = i32;

/// The file descriptor table
#[derive(Debug)]
pub struct FdTable {
Expand All @@ -424,9 +427,6 @@ impl VisitProvenance for FdTable {
}
}

/// Internal type of a file-descriptor - this is what [`FdTable`] expects
pub type FdNum = i32;

impl FdTable {
fn new() -> Self {
FdTable { fds: BTreeMap::new(), next_file_description_id: FdId(0) }
Expand Down
5 changes: 4 additions & 1 deletion src/shims/windows/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ bitflags! {
/// This must be passed to allow getting directory handles. If not passed, we error on trying
/// to open directories
const BACKUP_SEMANTICS = 1 << 1;
/// Open a reparse point as a regular file - this is basically similar to 'readlink' in Unix
/// terminology. A reparse point is a file with custom logic when navigated to, of which
/// a symlink is one specific example.
const OPEN_REPARSE = 1 << 2;
}
}
Expand Down Expand Up @@ -251,7 +254,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
options.append(true);
}
}
OpenExisting => (), // Nothing
OpenExisting => {} // Default options
TruncateExisting => {
options.truncate(true);
}
Expand Down

0 comments on commit e740a04

Please sign in to comment.