Skip to content

impl Clone where appropriate #43

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

Merged
merged 1 commit into from
Oct 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/instructions/port.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl PortReadWrite for u32 {
}

/// An I/O port.
#[derive(Debug)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Port<T: PortReadWrite> {
port: u16,
phantom: PhantomData<T>,
Expand Down
4 changes: 2 additions & 2 deletions src/structures/gdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl fmt::Debug for SegmentSelector {
/// switching between user and kernel mode or for loading a TSS.
///
/// The GDT has a fixed size of 8 entries, trying to add more entries will panic.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct GlobalDescriptorTable {
table: [u64; 8],
next_free: usize,
Expand Down Expand Up @@ -109,7 +109,7 @@ impl GlobalDescriptorTable {
///
/// Segmentation is no longer supported in 64-bit mode, so most of the descriptor
/// contents are ignored.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum Descriptor {
/// Descriptor for a code or data segment.
///
Expand Down
2 changes: 2 additions & 0 deletions src/structures/idt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use {PrivilegeLevel, VirtAddr};
/// [AMD64 manual volume 2](https://support.amd.com/TechDocs/24593.pdf)
/// (with slight modifications).
#[allow(missing_debug_implementations)]
#[derive(Clone)]
#[repr(C)]
pub struct InterruptDescriptorTable {
/// A divide by zero exception (`#DE`) occurs when the denominator of a DIV instruction or
Expand Down Expand Up @@ -637,6 +638,7 @@ impl EntryOptions {
}

/// Represents the exception stack frame pushed by the CPU on exception entry.
#[derive(Clone)]
#[repr(C)]
pub struct ExceptionStackFrame {
/// This value points to the instruction that should be executed when the interrupt
Expand Down