Skip to content

Commit

Permalink
Remove unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Oct 25, 2022
1 parent 94ca1df commit 5b579b0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
4 changes: 2 additions & 2 deletions crates/fj-viewer/src/graphics/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ impl Renderer {
})
}

pub(crate) fn init_gui(&self, pixels_per_point: f32) -> Gui {
Gui::new(&self.device, self.surface_config.format, pixels_per_point)
pub(crate) fn init_gui(&self) -> Gui {
Gui::new(&self.device, self.surface_config.format)
}

/// Updates the geometry of the model being rendered.
Expand Down
1 change: 0 additions & 1 deletion crates/fj-viewer/src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ impl Gui {
pub(crate) fn new(
device: &wgpu::Device,
texture_format: wgpu::TextureFormat,
_: f32,
) -> Self {
// The implementation of the integration with `egui` is likely to need
// to change "significantly" depending on what architecture approach is
Expand Down
7 changes: 2 additions & 5 deletions crates/fj-viewer/src/viewer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ pub struct Viewer {

impl Viewer {
/// Construct a new instance of `Viewer`
pub async fn new(
screen: &impl Screen,
pixels_per_point: f32,
) -> Result<Self, RendererInitError> {
pub async fn new(screen: &impl Screen) -> Result<Self, RendererInitError> {
let renderer = Renderer::new(screen).await?;
let gui = renderer.init_gui(pixels_per_point);
let gui = renderer.init_gui();

Ok(Self {
camera: Camera::default(),
Expand Down
3 changes: 1 addition & 2 deletions crates/fj-window/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ pub fn run(

let event_loop = EventLoop::new();
let window = Window::new(&event_loop)?;
let mut viewer =
block_on(Viewer::new(&window, window.window().scale_factor() as f32))?;
let mut viewer = block_on(Viewer::new(&window))?;

let events = watcher.events();

Expand Down

0 comments on commit 5b579b0

Please sign in to comment.