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: etc_resolv_conf.rs
    path of file: ./repos/firezone/rust/connlib/shared/src/linux
    
    the code of the file until where you have to start completion: use std::{io::Write, net::IpAddr, path::Path};

pub const ETC_RESOLV_CONF: &str = "/etc/resolv.conf";
pub const ETC_RESOLV_CONF_BACKUP: &str = "/etc/resolv.conf.before-firezone";

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("Failed to read `resolv.conf`: {0}")]
    Read(std::io::Error),
    #[error("Failed to parse `resolv.conf`")]
    Parse,
    #[error("Failed to rewrite `resolv.conf`: {0}")]
    Rewrite(std::io::Err
    
    async fn resolv_conf_twice() -> Result<()> {
        let temp_dir = tempfile::TempDir::with_prefix("firezone-dns-test")?;

        let resolv_path = temp_dir.path().join("resolv.conf");
        let backup_path = temp_dir.path().join("resolv.conf.before-firezone");

        write_resolv_conf(&resolv_path, &[GOOGLE_DNS.into()])?;

        configure_dns_at_paths(
            &[IpAddr::from([100, 100, 111, 1])],
            &resolv_path,
            &backup_path,
        )
        .await?;

        configure_dns_at_paths(
            &[IpAddr::from([100, 100, 111, 2])],
            &resolv_path,
            &backup_path,
        )
        .await?;

        check_resolv_conf(&resolv_path, &[IpAddr::from([100, 100, 111, 2])])
            .context("{resolv_path}")?;
        check_resolv_conf(&backup_path, &[GOOGLE_DNS.into()]).context("{backup_path}")?;

        Ok(())
    }