Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hurenkam committed Oct 30, 2024
1 parent 21cf65f commit 59fd877
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 42 deletions.
6 changes: 0 additions & 6 deletions src/config/display/gtk.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
use crate::config::display::Display;
use crate::config::gpu::Gpu;
use crate::config::qemu_device::QemuDevice;
use serde::Deserialize;

#[derive(Deserialize, Debug, Clone)]
pub struct Gtk {
gl: bool,
}
impl Gtk {
pub fn boxed_default() -> Box<Self> {
Box::new(Self { gl: true })
}
}

impl QemuDevice for Gtk {
fn get_qemu_args(&self, _index: usize) -> Vec<String> {
Expand Down
8 changes: 0 additions & 8 deletions src/config/gpu/passthrough_gpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ pub struct PassthroughGpu {
pci: Vec<Pci>,
}

impl PassthroughGpu {
pub fn boxed_default() -> Box<Self> {
Box::new(Self {
pci: Default::default(),
})
}
}

impl QemuDevice for PassthroughGpu {
fn get_qemu_args(&self, _index: usize) -> Vec<String> {
let mut result = vec![];
Expand Down
8 changes: 0 additions & 8 deletions src/config/gpu/virtio_vga_gl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ pub struct VirtioVgaGl {
pci_address: String,
}

impl VirtioVgaGl {
pub fn boxed_default() -> Box<Self> {
Box::new(Self {
pci_address: default_pci_address(),
})
}
}

fn default_pci_address() -> String {
"0x2".to_string()
}
Expand Down
3 changes: 1 addition & 2 deletions src/config/system/bios.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::config::qemu_device::QemuDevice;
pub use crate::config::system::bios::ovmf::OVMF;
pub use crate::config::system::bios::seabios::SeaBios;
use crate::config::system::bios::seabios::SeaBios;

mod ovmf;
mod seabios;
Expand Down
6 changes: 0 additions & 6 deletions src/config/system/bios/ovmf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ pub struct OVMF {
uuid: String,
}

impl OVMF {
pub fn new(file: String, uuid: String) -> Self {
Self { file, uuid }
}
}

impl QemuDevice for OVMF {
fn get_qemu_args(&self, _index: usize) -> Vec<String> {
vec![
Expand Down
6 changes: 0 additions & 6 deletions src/config/system/chipset/q35.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ impl QemuDevice for Q35 {
}
}

impl Q35 {
pub fn new() -> Self {
Self {}
}
}

#[typetag::deserialize(name = "q35")]
impl Chipset for Q35 {}

Expand Down
3 changes: 1 addition & 2 deletions src/config/system/tpm.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::config::qemu_device::QemuDevice;
pub use crate::config::system::tpm::no_tpm::NoTpm;
pub use crate::config::system::tpm::swtpm::SwTpm;
use crate::config::system::tpm::no_tpm::NoTpm;

mod no_tpm;
mod pass_through_tpm;
Expand Down
4 changes: 0 additions & 4 deletions src/config/system/tpm/swtpm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ pub struct SwTpm {
impl Tpm for SwTpm {}

impl SwTpm {
pub fn new(disk: String, socket: String) -> Self {
Self { disk, socket }
}

fn spawn(&self, uid: u32, gid: u32, name: String) -> Result<Child, EzkvmError> {
Command::new("/usr/bin/env")
.args(self.get_args())
Expand Down

0 comments on commit 59fd877

Please sign in to comment.