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: span_encoding.rs
    path of file: ./repos/kcl/compiler_base/3rdparty/rustc_span/src
    
    the code of the file until where you have to start completion: // Spans are encoded using 1-bit tag and 2 different encoding formats (one for each tag value).
// One format is used for keeping span da
    
    pub fn new(mut lo: BytePos, mut hi: BytePos) -> Self {
        if lo > hi {
            std::mem::swap(&mut lo, &mut hi);
        }

        let (base, len) = (lo.0, hi.0 - lo.0);

        Span {
            base_or_index: base,
            len_or_tag: len as u16,
        }
    }