You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: auto_fov.rs
    path of file: ./repos/amethyst/amethyst_utils/src
    
    the code of the file until where you have to start completion: //! Utility to adjust the aspect ratio of cameras automatically

use amethyst_core::ecs::{IntoQuery, ParallelRunnable, System, SystemBuilder, Write};
use amethyst_rendy::camera::Camera;
use amethyst_window::ScreenDimensions;
use serde::{Deserialize, Serialize};
#[cfg(feature = "profiler")]
use thread_profiler::profile_scope;

/// A component that stores the parameters that the associated camera should have
/// when it is managed by the `AutoFovSystem`.
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(default)]
pub struct AutoFov {
    fov_y: f32,
    z_near: f32,
    // FOV has to be adjusted when the camera parameters change or when a new
    // camera is created.
    dirty: bool,
}

impl AutoFov {
    /// Creates a new instance with vertical fov of pi/3 and near plane of 0.125.
    #[must_use]
    pub fn new() -> Self
    
    fn build(self) -> Box<dyn ParallelRunnable> {
        let mut last_dimensions = ScreenDimensions::new(0, 0);

        Box::new(
            SystemBuilder::new("auto_fov_system")
                .read_resource::<ScreenDimensions>()
                .with_query(<(Write<Camera>, Write<AutoFov>)>::query())
                .build(move |_commands, subworld, screen, query| {
                    #[cfg(feature = "profiler")]
                    profile_scope!("auto_fov_system");

                    for (camera, auto_fov) in query.iter_mut(subworld) {
                        if last_dimensions != **screen || auto_fov.dirty {
                            *camera = Camera::perspective(
                                screen.aspect_ratio(),
                                auto_fov.fov_y,
                                auto_fov.z_near,
                            );
                            auto_fov.dirty = false;
                        }
                    }
                    last_dimensions = screen.clone();
                }),
        )
    }