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: lib.rs
    path of file: ./repos/zola/components/link_checker/src
    
    the code of the file until where you have to start completion: use std::collections::HashMap;
use std::result;
use std::sync::{Arc, RwLock};

use libs::once_cell::sync::Lazy;
use libs::reqwest::header::{HeaderMap, ACCEPT};
use libs::reqwest::{blocking::Client, StatusCode};

use config::LinkChecker;
use errors::anyhow;

use utils::anchors::has_anchor_id;

pub type Result = result::Result<StatusCode, String>;

pub fn is_valid(res: &Result) -> bool {
    match res {
        Ok(ref code) => code.is_success() || *code == StatusCode::NOT_MODIFIED,
        Err(_) => false,
    }
}

pub fn message(res: &Result) -> String {
    match res {
        Ok(ref code) => format!("{
    
    fn can_follow_301_links() {
        let _m1 = mock("GET", "/c7qrtrv3zz")
            .with_status(301)
            .with_header("Content-Type", "text/plain")
            .with_header("Location", format!("{}/rbs5avjs8e", mockito::server_url()).as_str())
            .with_body("Redirecting...")
            .create();

        let _m2 = mock("GET", "/rbs5avjs8e")
            .with_header("Content-Type", "text/plain")
            .with_body("Test")
            .create();

        let url = format!("{}{}", mockito::server_url(), "/c7qrtrv3zz");
        let res = check_url(&url, &LinkChecker::default());
        assert!(is_valid(&res));
        assert!(res.is_ok());
        assert_eq!(message(&res), "200 OK");
    }